source: asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread/pthread_detach.c@ 337

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

ASP3版ECNLを追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-csrc;charset=UTF-8
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.