summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthreadcreate.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-17 10:06:08 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-17 10:12:10 +0200
commit2fcea4c47325578d887d2c061a86e5e178d7a32a (patch)
treef779f8268a4a25365d4509ba082ab9f1204b2c2b /cpukit/posix/src/pthreadcreate.c
parentscore: Rename _Watchdog_Per_CPU_insert_monotonic() (diff)
downloadrtems-2fcea4c47325578d887d2c061a86e5e178d7a32a.tar.bz2
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().
Diffstat (limited to 'cpukit/posix/src/pthreadcreate.c')
-rw-r--r--cpukit/posix/src/pthreadcreate.c3
1 files changed, 1 insertions, 2 deletions
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 );