diff options
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/posix/include/rtems/posix/threadsup.h | 3 | ||||
-rw-r--r-- | cpukit/posix/src/pthreadcreate.c | 4 | ||||
-rw-r--r-- | cpukit/posix/src/pthreadgetattrnp.c | 6 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 6 |
4 files changed, 11 insertions, 8 deletions
diff --git a/cpukit/posix/include/rtems/posix/threadsup.h b/cpukit/posix/include/rtems/posix/threadsup.h index 4b62b19e1c..d3ee5b28bb 100644 --- a/cpukit/posix/include/rtems/posix/threadsup.h +++ b/cpukit/posix/include/rtems/posix/threadsup.h @@ -40,9 +40,6 @@ extern "C" { * each thread in a system with POSIX configured. */ typedef struct { - /** Created with explicit or inherited scheduler. */ - bool created_with_explicit_scheduler; - /** * @brief Control block for the sporadic server scheduling policy. */ diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c index 348bf68430..46fe1e7412 100644 --- a/cpukit/posix/src/pthreadcreate.c +++ b/cpukit/posix/src/pthreadcreate.c @@ -250,8 +250,8 @@ int pthread_create( api->signals_unblocked = executing_api->signals_unblocked; - api->created_with_explicit_scheduler = - ( the_attr->inheritsched == PTHREAD_EXPLICIT_SCHED ); + the_thread->was_created_with_inherited_scheduler = + ( the_attr->inheritsched == PTHREAD_INHERIT_SCHED ); _Priority_Node_set_priority( &api->Sporadic.Low_priority, core_low_prio ); api->Sporadic.sched_ss_repl_period = diff --git a/cpukit/posix/src/pthreadgetattrnp.c b/cpukit/posix/src/pthreadgetattrnp.c index 9df5bad38f..6690bda988 100644 --- a/cpukit/posix/src/pthreadgetattrnp.c +++ b/cpukit/posix/src/pthreadgetattrnp.c @@ -60,10 +60,10 @@ int pthread_getattr_np( attr->stackaddr = the_thread->Start.Initial_stack.area; attr->stacksize = the_thread->Start.Initial_stack.size; - if ( api->created_with_explicit_scheduler ) { - attr->inheritsched = PTHREAD_EXPLICIT_SCHED; - } else { + if ( the_thread->was_created_with_inherited_scheduler ) { attr->inheritsched = PTHREAD_INHERIT_SCHED; + } else { + attr->inheritsched = PTHREAD_EXPLICIT_SCHED; } scheduler = _Thread_Scheduler_get_home( the_thread ); diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index 488e961007..7e0e2722dd 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -773,6 +773,12 @@ struct _Thread_Control { /** This field is true if the thread uses the floating point unit. */ bool is_fp; + /** + * @brief True, if the thread was created with an inherited scheduler + * (PTHREAD_INHERIT_SCHED), and false otherwise. + */ + bool was_created_with_inherited_scheduler; + /** This field is the length of the time quantum that this thread is * allowed to consume. The algorithm used to manage limits on CPU usage * is specified by budget_algorithm. |