diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-01-24 15:04:11 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-01-24 15:04:11 +0100 |
commit | 625bd6aca47268bc21cfa38662ebc17413475e82 (patch) | |
tree | 44794efa6861381cf2634f08b8319dcb2c33c1ee /cpukit | |
parent | rtems: Fix _Rate_monotonic_Renew_deadline() (diff) | |
download | rtems-625bd6aca47268bc21cfa38662ebc17413475e82.tar.bz2 |
rtems: Fix _Rate_monotonic_Release_postponed_job()
Use proper locking in SMP configurations.
Update #2795.
Diffstat (limited to '')
-rw-r--r-- | cpukit/rtems/src/ratemonperiod.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cpukit/rtems/src/ratemonperiod.c b/cpukit/rtems/src/ratemonperiod.c index a4d224f0d9..d4746cbc6b 100644 --- a/cpukit/rtems/src/ratemonperiod.c +++ b/cpukit/rtems/src/ratemonperiod.c @@ -71,13 +71,10 @@ static void _Rate_monotonic_Release_postponed_job( ISR_lock_Context *lock_context ) { - /* This function only releases the postponed jobs. */ - Per_CPU_Control *cpu_self; + Per_CPU_Control *cpu_self; Thread_queue_Context queue_context; - cpu_self = _Thread_Dispatch_disable_critical( lock_context ); - _Rate_monotonic_Release( owner, lock_context ); - the_period->postponed_jobs -=1; + --the_period->postponed_jobs; _Scheduler_Release_job( owner, &the_period->Priority, @@ -85,6 +82,7 @@ static void _Rate_monotonic_Release_postponed_job( &queue_context ); + cpu_self = _Thread_Dispatch_disable_critical( lock_context ); _Rate_monotonic_Release( the_period, lock_context ); _Thread_Priority_update( &queue_context ); _Thread_Dispatch_enable( cpu_self ); |