diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-19 15:32:51 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-22 16:57:24 +0200 |
commit | 16243a207b2ae5ffa13b4cbd361c9f2c80d5e199 (patch) | |
tree | 53b375879edd35febd63c239b8f9f518351d7168 /cpukit | |
parent | score: Create spinlock implementation header (diff) | |
download | rtems-16243a207b2ae5ffa13b4cbd361c9f2c80d5e199.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')
-rw-r--r-- | cpukit/score/include/rtems/score/coremuteximpl.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/score/include/rtems/score/coremuteximpl.h b/cpukit/score/include/rtems/score/coremuteximpl.h index 67e7c99e7a..e84875d963 100644 --- a/cpukit/score/include/rtems/score/coremuteximpl.h +++ b/cpukit/score/include/rtems/score/coremuteximpl.h @@ -261,12 +261,12 @@ RTEMS_INLINE_ROUTINE void _CORE_mutex_Seize_body( if ( _CORE_mutex_Seize_interrupt_trylock( the_mutex, executing, level ) ) { if ( !wait ) { _ISR_Enable( level ); - _Thread_Executing->Wait.return_code = + executing->Wait.return_code = CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT; } else { _Thread_queue_Enter_critical_section( &the_mutex->Wait_queue ); - _Thread_Executing->Wait.queue = &the_mutex->Wait_queue; - _Thread_Executing->Wait.id = id; + executing->Wait.queue = &the_mutex->Wait_queue; + executing->Wait.id = id; _Thread_Disable_dispatch(); _ISR_Enable( level ); _CORE_mutex_Seize_interrupt_blocking( the_mutex, executing, timeout ); |