Last change
on this file since 444 was 444, checked in by coas-nagasima, 4 years ago |
muslのソースコードを追加
|
-
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 |
|
---|
4 | int __pthread_join(pthread_t, void **);
|
---|
5 |
|
---|
6 | static 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 |
|
---|
17 | weak_alias(__pthread_detach, pthread_detach);
|
---|
18 | weak_alias(__pthread_detach, thrd_detach);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.