mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-06 04:32:28 +00:00
Perform some code cleanup
This commit is contained in:
parent
0dd9629562
commit
a4601a24d3
63 changed files with 350 additions and 1643 deletions
|
@ -29,6 +29,7 @@
|
|||
#include "libc/sysv/consts/clone.h"
|
||||
#include "libc/sysv/consts/map.h"
|
||||
#include "libc/sysv/consts/prot.h"
|
||||
#include "libc/thread/internal.h"
|
||||
#include "libc/thread/thread.h"
|
||||
|
||||
STATIC_YOINK("_main_thread_ctor");
|
||||
|
@ -77,6 +78,7 @@ static int cthread_start(void *arg) {
|
|||
exitcode = (void *)rc.dx;
|
||||
}
|
||||
td->exitcode = exitcode;
|
||||
_pthread_key_destruct(td->key);
|
||||
if (atomic_load(&td->state) & cthread_detached) {
|
||||
// we're still using the stack
|
||||
// thus we can't munmap it yet
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue