3 ms·
Then let me remove posix semaphores and replace it all with futexes. It'd be great to not need a file descriptor every time one of my threads wants to wait on a
by jart 2y ago
Then let me remove posix semaphores and replace it all with futexes. It'd be great to not need a file descriptor every time one of my threads wants to wait on a mutex or condition variable.
- washbear 2y agoIf that's your first target for removal, I'd wager a large amount of money that you're [unfamiliar](https://man.netbsd.org/compat_freebsd.8 https://man.netbsd.org/compat_freebsd.8) with the NetBSD code base.
- jart 2y agoI only really have experience talking directly to the kernel abis, i.e. the stuff in netbsd/sys/kern/syscalls.master. I'm using sem_open / sem_wait / etc. as my futex replacement. What abi should I be using? https://github.com/jart/cosmopolitan/blob/master/third_party/nsync/mu_semaphore_sem.c https://github.com/jart/cosmopolitan/blob/master/third_party...