summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-04 15:26:52 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-09 15:27:28 +0100
commit2f5ac5b5075e2efe8fc2cdbf151ee36939e82003 (patch)
tree4583a62161973a263a50107ebe9898529e689c8d /cpukit/rtems
parentscore: Inline some SMP lock operations by default (diff)
downloadrtems-2f5ac5b5075e2efe8fc2cdbf151ee36939e82003.tar.bz2
rtems: Fix rtems_task_create() scheduler selection
Use the home scheduler of the executing thread for the created thread. This is in line with pthread_create(). Using the current processor may pick up an unexpected scheduler in case of a temporary migration, e.g. due to locking protocols.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r--cpukit/rtems/src/taskcreate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/rtems/src/taskcreate.c b/cpukit/rtems/src/taskcreate.c
index e231d4a0c3..26953828e9 100644
--- a/cpukit/rtems/src/taskcreate.c
+++ b/cpukit/rtems/src/taskcreate.c
@@ -90,7 +90,7 @@ rtems_status_code rtems_task_create(
}
}
- scheduler = _Scheduler_Get_by_CPU_index( _SMP_Get_current_processor() );
+ scheduler = _Thread_Scheduler_get_home( _Thread_Get_executing() );
priority = _RTEMS_Priority_To_core( scheduler, initial_priority, &valid );
if ( !valid ) {