summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/posix/src/pthreaddetach.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/posix/src/pthreaddetach.c b/cpukit/posix/src/pthreaddetach.c
index ee69a9a718..cf4a3f3f48 100644
--- a/cpukit/posix/src/pthreaddetach.c
+++ b/cpukit/posix/src/pthreaddetach.c
@@ -40,7 +40,7 @@ int pthread_detach( pthread_t thread )
return ESRCH;
}
- _Thread_State_acquire( the_thread, &lock_context );
+ _Thread_State_acquire_critical( the_thread, &lock_context );
the_thread->Life.state |= THREAD_LIFE_DETACHED;
_Thread_Clear_state_locked( the_thread, STATES_WAITING_FOR_JOIN_AT_EXIT );