diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-17 15:53:17 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-18 09:58:58 +0200 |
commit | 95e09afa92c5d0522a0d04019ef6680796688896 (patch) | |
tree | 2c04a60ed5669b4baba5a783e1919b4b4a37d858 /cpukit/score/src/coremutexseize.c | |
parent | score: Convert to inline function (diff) | |
download | rtems-95e09afa92c5d0522a0d04019ef6680796688896.tar.bz2 |
score: Avoid direct usage of _Thread_Executing
Pass the executing thread as a function parameter. Obtain the executing
thread inside a thread dispatch critical section to avoid problems on
SMP.
Diffstat (limited to 'cpukit/score/src/coremutexseize.c')
-rw-r--r-- | cpukit/score/src/coremutexseize.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/cpukit/score/src/coremutexseize.c b/cpukit/score/src/coremutexseize.c index 098d6f2472..3da513a77b 100644 --- a/cpukit/score/src/coremutexseize.c +++ b/cpukit/score/src/coremutexseize.c @@ -28,24 +28,31 @@ #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) void _CORE_mutex_Seize( CORE_mutex_Control *_the_mutex, + Thread_Control *_executing, Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { - _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); + _CORE_mutex_Seize_body( + _the_mutex, + _executing, + _id, + _wait, + _timeout, + _level + ); } #endif void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, + Thread_Control *executing, Watchdog_Interval timeout ) { - Thread_Control *executing; - executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { if ( _Scheduler_Is_priority_higher_than( executing->current_priority, |