mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Add pthread attributes and other libc functions
This commit is contained in:
parent
d5c9308a43
commit
4339d9f15e
81 changed files with 1111 additions and 428 deletions
|
@ -36,10 +36,10 @@ int pthread_detach(pthread_t thread) {
|
|||
if (status == kPosixThreadDetached || status == kPosixThreadZombie) {
|
||||
break;
|
||||
} else if (status == kPosixThreadTerminated) {
|
||||
_join(&pt->spawn);
|
||||
free(pt);
|
||||
pthread_wait(pt);
|
||||
pthread_free(pt);
|
||||
break;
|
||||
} else if (status == kPosixThreadStarted &&
|
||||
} else if (status == kPosixThreadJoinable &&
|
||||
atomic_compare_exchange_weak_explicit(
|
||||
&pt->status, &status, kPosixThreadDetached,
|
||||
memory_order_acquire, memory_order_relaxed)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue