Clean up threading code some more

This commit is contained in:
Justine Tunney 2022-09-13 14:57:38 -07:00
parent 6a3330d7c9
commit 654ceaba7d
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
28 changed files with 119 additions and 134 deletions

View file

@ -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();