[rtems commit] posix: Fix pthread_detach() internal lock acquire

Sebastian Huber sebh at rtems.org
Tue Mar 28 08:34:24 UTC 2017


Module:    rtems
Branch:    master
Commit:    82c0836f205d2721183ce62ad5694a8de95ec367
Changeset: http://git.rtems.org/rtems/commit/?id=82c0836f205d2721183ce62ad5694a8de95ec367

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Mar 28 07:51:16 2017 +0200

posix: Fix pthread_detach() internal lock acquire

---

 cpukit/posix/src/pthreaddetach.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/posix/src/pthreaddetach.c b/cpukit/posix/src/pthreaddetach.c
index ee69a9a..cf4a3f3 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 );




More information about the vc mailing list