summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-04 13:43:15 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-07 14:51:31 +0200
commit47445846984a51dbc7892413a04994586ae0220a (patch)
tree6485669bb265fcdc5045a7249f9f0d15e247963b
parent94086a9cb7a6201e0437448e2b84c4c77e81c05b (diff)
downloadrtems-47445846984a51dbc7892413a04994586ae0220a.tar.bz2
score: Delete _Thread_Maximum_extensions
Use the Configuration instead.
-rw-r--r--cpukit/score/include/rtems/score/threadimpl.h7
-rw-r--r--cpukit/score/src/thread.c4
-rw-r--r--cpukit/score/src/threadinitialize.c13
-rw-r--r--testsuites/sptests/spsize/size.c1
4 files changed, 6 insertions, 19 deletions
diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h
index 6d4ca9f898..f109d391b1 100644
--- a/cpukit/score/include/rtems/score/threadimpl.h
+++ b/cpukit/score/include/rtems/score/threadimpl.h
@@ -58,13 +58,6 @@ SCORE_EXTERN void *rtems_ada_self;
SCORE_EXTERN Objects_Information _Thread_Internal_information;
/**
- * The following holds how many user extensions are in the system. This
- * is used to determine how many user extension data areas to allocate
- * per thread.
- */
-SCORE_EXTERN uint32_t _Thread_Maximum_extensions;
-
-/**
* The following is used to manage the length of a timeslice quantum.
*/
SCORE_EXTERN uint32_t _Thread_Ticks_per_timeslice;
diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c
index 5063c78c96..589e474733 100644
--- a/cpukit/score/src/thread.c
+++ b/cpukit/score/src/thread.c
@@ -25,8 +25,6 @@ void _Thread_Handler_initialization(void)
{
uint32_t ticks_per_timeslice =
rtems_configuration_get_ticks_per_timeslice();
- uint32_t maximum_extensions =
- rtems_configuration_get_maximum_extensions();
rtems_stack_allocate_init_hook stack_allocate_init_hook =
rtems_configuration_get_stack_allocate_init_hook();
#if defined(RTEMS_MULTIPROCESSING)
@@ -52,8 +50,6 @@ void _Thread_Handler_initialization(void)
_Thread_Allocated_fp = NULL;
#endif
- _Thread_Maximum_extensions = maximum_extensions;
-
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
#if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c
index cf96c24bcd..22f1b43c88 100644
--- a/cpukit/score/src/threadinitialize.c
+++ b/cpukit/score/src/threadinitialize.c
@@ -155,9 +155,9 @@ bool _Thread_Initialize(
/*
* Allocate the extensions area for this thread
*/
- if ( _Thread_Maximum_extensions ) {
+ if ( rtems_configuration_get_maximum_extensions() ) {
extensions_area = _Workspace_Allocate(
- (_Thread_Maximum_extensions + 1) * sizeof( void * )
+ (rtems_configuration_get_maximum_extensions() + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
@@ -169,12 +169,11 @@ bool _Thread_Initialize(
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
- * call.
+ * call. The object index starts with one, so the first extension context is
+ * unused.
*/
- if ( the_thread->extensions ) {
- for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
- the_thread->extensions[i] = NULL;
- }
+ for ( i = 1 ; i <= rtems_configuration_get_maximum_extensions() ; ++i )
+ the_thread->extensions[ i ] = NULL;
/*
* General initialization
diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c
index f24bc9b3e1..1d4c96bb49 100644
--- a/testsuites/sptests/spsize/size.c
+++ b/testsuites/sptests/spsize/size.c
@@ -385,7 +385,6 @@ uninitialized =
/*tasksimpl.h*/ (sizeof _RTEMS_tasks_Information) +
/*thread.h*/ (sizeof _Thread_Dispatch_disable_level) +
- (sizeof _Thread_Maximum_extensions) +
(sizeof _Thread_Ticks_per_timeslice) +
(sizeof _Thread_Executing) +
(sizeof _Thread_Heir) +