diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-06 15:41:00 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-14 16:26:08 +0200 |
commit | a936aa49b5171915aee6c7cecc0b84a3912fd692 (patch) | |
tree | ec2c8adb89b3659a583e2c208c69dba3d4558073 /cpukit/score/src/threaddispatch.c | |
parent | scheduler: Simplify simple scheduler (diff) | |
download | rtems-a936aa49b5171915aee6c7cecc0b84a3912fd692.tar.bz2 |
scheduler: New simple SMP scheduler implementation
The new Simple SMP Scheduler allocates a processor for the processor
count highest priority ready threads. The thread priority and position
in the ready chain are the only information to determine the scheduling
decision. Threads with an allocated processor are in the scheduled
chain. After initialization the scheduled chain has exactly processor
count nodes. Each processor has exactly one allocated thread after
initialization. All enqueue and extract operations may exchange threads
with the scheduled chain. One thread will be added and another will be
removed. The scheduled and ready chain is ordered according to the
thread priority order. The chain insert operations are O(count of ready
threads), thus this scheduler is unsuitable for most real-time
applications.
The thread preempt mode will be ignored.
Diffstat (limited to 'cpukit/score/src/threaddispatch.c')
-rw-r--r-- | cpukit/score/src/threaddispatch.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c index 4856f8e67b..4cd449d55b 100644 --- a/cpukit/score/src/threaddispatch.c +++ b/cpukit/score/src/threaddispatch.c @@ -94,7 +94,10 @@ void _Thread_Dispatch( void ) _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; - #ifndef RTEMS_SMP + #if defined(RTEMS_SMP) + executing->is_executing = false; + heir->is_executing = true; + #else _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; |