From 2fcea4c47325578d887d2c061a86e5e178d7a32a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 17 Oct 2017 10:06:08 +0200 Subject: posix: Fix _POSIX_Threads_Create_extension() The thread POSIX API control must be fully initialized in _POSIX_Threads_Create_extension(), otherwise a pthread_setschedparam() is broken for all threads not created with pthread_create(). --- cpukit/posix/src/pthreadcreate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cpukit/posix/src/pthreadcreate.c') diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c index 75205f7e0a..d8cafe52ce 100644 --- a/cpukit/posix/src/pthreadcreate.c +++ b/cpukit/posix/src/pthreadcreate.c @@ -242,8 +242,7 @@ int pthread_create( ( the_attr->inheritsched == PTHREAD_EXPLICIT_SCHED ); api->schedpolicy = the_attr->schedpolicy; api->schedparam = the_attr->schedparam; - _Priority_Node_initialize( &api->Sporadic.Low_priority, core_low_prio ); - _Priority_Node_set_inactive( &api->Sporadic.Low_priority ); + _Priority_Node_set_priority( &api->Sporadic.Low_priority, core_low_prio ); if ( schedpolicy == SCHED_SPORADIC ) { _POSIX_Threads_Sporadic_timer( &api->Sporadic.Timer ); -- cgit v1.2.3