Changeset 2f5ac5b in rtems


Ignore:
Timestamp:
Nov 4, 2016, 2:26:52 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
947814ca
Parents:
eb98dd49
git-author:
Sebastian Huber <sebastian.huber@…> (11/04/16 14:26:52)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/09/16 14:27:28)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/taskcreate.c

    reb98dd49 r2f5ac5b  
    9191  }
    9292
    93   scheduler = _Scheduler_Get_by_CPU_index( _SMP_Get_current_processor() );
     93  scheduler = _Thread_Scheduler_get_home( _Thread_Get_executing() );
    9494
    9595  priority = _RTEMS_Priority_To_core( scheduler, initial_priority, &valid );
Note: See TracChangeset for help on using the changeset viewer.