mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-10-06 22:47:20 +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
7
third_party/nsync/common.c
vendored
7
third_party/nsync/common.c
vendored
|
@ -37,6 +37,7 @@
|
|||
#include "third_party/nsync/atomic.internal.h"
|
||||
#include "third_party/nsync/common.internal.h"
|
||||
#include "third_party/nsync/mu_semaphore.h"
|
||||
#include "third_party/nsync/mu_semaphore.internal.h"
|
||||
#include "third_party/nsync/wait_s.internal.h"
|
||||
__static_yoink("nsync_notice");
|
||||
|
||||
|
@ -147,9 +148,9 @@ static void free_waiters_push (waiter *w) {
|
|||
|
||||
static void free_waiters_populate (void) {
|
||||
int n;
|
||||
if (IsNetbsd () || IsXnuSilicon ()) {
|
||||
// netbsd needs one file descriptor per semaphore (!!)
|
||||
// tim cook wants us to use his grand central dispatch
|
||||
if (IsNetbsd () || (NSYNC_USE_GRAND_CENTRAL && IsXnuSilicon ())) {
|
||||
// netbsd needs a real file descriptor per semaphore
|
||||
// tim cook wants us to use his lol central dispatch
|
||||
n = 1;
|
||||
} else {
|
||||
n = getpagesize() / sizeof(waiter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue