summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-19 15:32:51 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-22 16:57:24 +0200
commit16243a207b2ae5ffa13b4cbd361c9f2c80d5e199 (patch)
tree53b375879edd35febd63c239b8f9f518351d7168 /cpukit/score
parentscore: Create spinlock implementation header (diff)
downloadrtems-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/score')
-rw-r--r--cpukit/score/include/rtems/score/coremuteximpl.h6
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 );