source: azure_iot_hub/trunk/musl-1.1.18/src/thread/pthread_detach.c@ 388

Last change on this file since 388 was 388, checked in by coas-nagasima, 5 years ago

Azure IoT Hub Device C SDK を使ったサンプルの追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-csrc
File size: 420 bytes
Line 
1#include "pthread_impl.h"
2#include <threads.h>
3
4int __pthread_join(pthread_t, void **);
5
6static int __pthread_detach(pthread_t t)
7{
8 /* Cannot detach a thread that's already exiting */
9 if (a_swap(t->exitlock, 1))
10 return __pthread_join(t, 0);
11 t->detached = 2;
12 a_store(t->exitlock, 0);
13 __wake(t->exitlock, 1, 1);
14 return 0;
15}
16
17weak_alias(__pthread_detach, pthread_detach);
18weak_alias(__pthread_detach, thrd_detach);
Note: See TracBrowser for help on using the repository browser.