From 0444947e63715829d484b411f63244585ad6f449 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 19 Jul 2013 11:07:37 +0200 Subject: 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. --- cpukit/score/src/corebarrierwait.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cpukit/score/src') diff --git a/cpukit/score/src/corebarrierwait.c b/cpukit/score/src/corebarrierwait.c index a5b685a779..465402ab82 100644 --- a/cpukit/score/src/corebarrierwait.c +++ b/cpukit/score/src/corebarrierwait.c @@ -27,16 +27,15 @@ void _CORE_barrier_Wait( CORE_barrier_Control *the_barrier, + Thread_Control *executing, Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { - Thread_Control *executing; ISR_Level level; - executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; -- cgit v1.2.3