Make _Thread_local more seamlessly working

This commit is contained in:
Justine Tunney 2022-07-10 08:27:50 -07:00
parent 5f4f6b0e69
commit 5fa77f1e8f
23 changed files with 217 additions and 283 deletions

View file

@ -17,6 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/bits/atomic.h"
#include "libc/calls/calls.h"
#include "libc/thread/thread.h"
STATIC_YOINK("_main_thread_ctor");
@ -29,7 +30,7 @@ static void Pause(int attempt) {
__builtin_ia32_pause();
}
} else {
cthread_yield();
sched_yield();
}
}