summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/barrierwait.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/rtems/src/barrierwait.c')
-rw-r--r--cpukit/rtems/src/barrierwait.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/rtems/src/barrierwait.c b/cpukit/rtems/src/barrierwait.c
index 515f9352c7..a233908bf1 100644
--- a/cpukit/rtems/src/barrierwait.c
+++ b/cpukit/rtems/src/barrierwait.c
@@ -32,13 +32,16 @@ rtems_status_code rtems_barrier_wait(
{
Barrier_Control *the_barrier;
Objects_Locations location;
+ Thread_Control *executing;
the_barrier = _Barrier_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
+ executing = _Thread_Executing;
_CORE_barrier_Wait(
&the_barrier->Barrier,
+ executing,
id,
true,
timeout,
@@ -46,7 +49,7 @@ rtems_status_code rtems_barrier_wait(
);
_Objects_Put( &the_barrier->Object );
return _Barrier_Translate_core_barrier_return_code(
- _Thread_Executing->Wait.return_code );
+ executing->Wait.return_code );
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: