mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-26 12:27:11 +08:00
score: Delete _Thread_Maximum_extensions
Use the Configuration instead.
This commit is contained in:
@@ -57,13 +57,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.
|
||||
*/
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) +
|
||||
|
||||
Reference in New Issue
Block a user