mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Clean up threading code some more
This commit is contained in:
parent
6a3330d7c9
commit
654ceaba7d
28 changed files with 119 additions and 134 deletions
|
@ -488,11 +488,8 @@ static int CloneLinux(int (*func)(void *arg, int tid), char *stk, size_t stksz,
|
|||
* return 0;
|
||||
* }
|
||||
*
|
||||
* struct CosmoTib tib = {
|
||||
* .tib_self = &tib,
|
||||
* .tib_self2 = &tib,
|
||||
* .tib_tid = -1,
|
||||
* };
|
||||
* // NOTE: See _mktls() for _Thread_local support.
|
||||
* struct CosmoTib tib = {.tib_self = &tib, .tib_tid = -1};
|
||||
* char *stk = _mapstack();
|
||||
* tid = clone(worker, stk, GetStackSize() - 16,
|
||||
* CLONE_VM | CLONE_THREAD | CLONE_FS | CLONE_FILES |
|
||||
|
@ -589,7 +586,6 @@ static int CloneLinux(int (*func)(void *arg, int tid), char *stk, size_t stksz,
|
|||
int clone(void *func, void *stk, size_t stksz, int flags, void *arg, int *ptid,
|
||||
void *tls, void *ctid) {
|
||||
int rc;
|
||||
struct CloneArgs *wt;
|
||||
|
||||
if (flags & CLONE_THREAD) {
|
||||
__enable_threads();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue