summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/prwlockwrlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/prwlockwrlock.c')
-rw-r--r--cpukit/posix/src/prwlockwrlock.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/cpukit/posix/src/prwlockwrlock.c b/cpukit/posix/src/prwlockwrlock.c
index b53a7e0a61..799fb7ae7e 100644
--- a/cpukit/posix/src/prwlockwrlock.c
+++ b/cpukit/posix/src/prwlockwrlock.c
@@ -45,6 +45,7 @@ int pthread_rwlock_wrlock(
{
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
+ Thread_Control *executing;
if ( !rwlock )
return EINVAL;
@@ -54,17 +55,19 @@ int pthread_rwlock_wrlock(
case OBJECTS_LOCAL:
+ executing = _Thread_Executing;
_CORE_RWLock_Obtain_for_writing(
- &the_rwlock->RWLock,
- *rwlock,
- true, /* do not timeout -- wait forever */
- 0,
- NULL
+ &the_rwlock->RWLock,
+ executing,
+ *rwlock,
+ true, /* do not timeout -- wait forever */
+ 0,
+ NULL
);
_Objects_Put( &the_rwlock->Object );
return _POSIX_RWLock_Translate_core_RWLock_return_code(
- (CORE_RWLock_Status) _Thread_Executing->Wait.return_code
+ (CORE_RWLock_Status) executing->Wait.return_code
);
#if defined(RTEMS_MULTIPROCESSING)