forked from Imagelibrary/rtems
posix: Move POSIX_API_Control::thread
This member is only used by the sporadic server support. Update #2514.
This commit is contained in:
@@ -40,9 +40,6 @@ extern "C" {
|
||||
* each thread in a system with POSIX configured.
|
||||
*/
|
||||
typedef struct {
|
||||
/** Back pointer to thread of this POSIX API control. */
|
||||
Thread_Control *thread;
|
||||
|
||||
/** Created with explicit or inherited scheduler. */
|
||||
bool created_with_explicit_scheduler;
|
||||
|
||||
@@ -56,6 +53,9 @@ typedef struct {
|
||||
* @brief Control block for the sporadic server scheduling policy.
|
||||
*/
|
||||
struct {
|
||||
/** The thread of this sporadic control block */
|
||||
Thread_Control *thread;
|
||||
|
||||
/**
|
||||
* @brief This is the timer which controls when the thread executes at high
|
||||
* and low priority when using the sporadic server scheduling policy.
|
||||
|
||||
@@ -49,7 +49,7 @@ void _POSIX_Threads_Sporadic_timer( Watchdog_Control *watchdog )
|
||||
Thread_queue_Context queue_context;
|
||||
|
||||
api = RTEMS_CONTAINER_OF( watchdog, POSIX_API_Control, Sporadic.Timer );
|
||||
the_thread = api->thread;
|
||||
the_thread = api->Sporadic.thread;
|
||||
|
||||
_Thread_queue_Context_initialize( &queue_context );
|
||||
_Thread_queue_Context_clear_priority_updates( &queue_context );
|
||||
@@ -127,7 +127,6 @@ static bool _POSIX_Threads_Create_extension(
|
||||
api = created->API_Extensions[ THREAD_API_POSIX ];
|
||||
|
||||
/* XXX check all fields are touched */
|
||||
api->thread = created;
|
||||
api->schedparam.sched_priority = _POSIX_Priority_From_core(
|
||||
_Thread_Scheduler_get_home( created ),
|
||||
_Thread_Get_priority( created )
|
||||
@@ -149,6 +148,7 @@ static bool _POSIX_Threads_Create_extension(
|
||||
api->signals_unblocked = executing_api->signals_unblocked;
|
||||
}
|
||||
|
||||
api->Sporadic.thread = created;
|
||||
_Watchdog_Preinitialize( &api->Sporadic.Timer, _Per_CPU_Get_by_index( 0 ) );
|
||||
_Watchdog_Initialize( &api->Sporadic.Timer, _POSIX_Threads_Sporadic_timer );
|
||||
_Priority_Node_set_inactive( &api->Sporadic.Low_priority );
|
||||
|
||||
Reference in New Issue
Block a user