mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 07:18:30 +00:00
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:
parent
2187d6d2dd
commit
e398f3887c
20 changed files with 566 additions and 171 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue