Make more improvements to threads and mappings

- NetBSD should now have faster synchronization
- POSIX barriers may now be shared across processes
- An edge case with memory map tracking has been fixed
- Grand Central Dispatch is no longer used on MacOS ARM64
- POSIX mutexes in normal mode now use futexes across processes
This commit is contained in:
Justine Tunney 2024-07-24 01:05:00 -07:00
parent 2187d6d2dd
commit e398f3887c
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
20 changed files with 566 additions and 171 deletions

View file

@ -26,11 +26,9 @@
int begin_cancelation_point(void) {
int state = 0;
struct CosmoTib *tib;
struct PosixThread *pt;
if (__tls_enabled) {
tib = __get_tls();
if ((pt = (struct PosixThread *)tib->tib_pthread)) {
struct PosixThread *pt;
if ((pt = _pthread_self())) {
state = pt->pt_flags & PT_INCANCEL;
pt->pt_flags |= PT_INCANCEL;
}
@ -39,11 +37,9 @@ int begin_cancelation_point(void) {
}
void end_cancelation_point(int state) {
struct CosmoTib *tib;
struct PosixThread *pt;
if (__tls_enabled) {
tib = __get_tls();
if ((pt = (struct PosixThread *)tib->tib_pthread)) {
struct PosixThread *pt;
if ((pt = _pthread_self())) {
pt->pt_flags &= ~PT_INCANCEL;
pt->pt_flags |= state;
}