Ever interested in knowing how your C library's mutexes work? If so, check out my latest blog post! https://nuxi.nl/blog/2016/06/22/cloudabi-futexes.html …
@ed_maste Maybe I'm missing something but your "futexes" look like they need syscalls for every op, opposite of futex.
-
-
Non-blocking ops are separate syscalls. Blocking ops are integrated in polling. That allows for timeouts, etc.
-
If nonblocking ops need syscalls it's not a futex, just a classic slow kernel-based mutex...
-
The nonblocking ops are wakeups. Only invoked when mutexes/condvars have waiters. Same as with Linux futexes.
-
I meant trylock or unconfended lock ops.
-
That's also done in userspace entirely. Check out https://github.com/NuxiNL/cloudlibc/blob/master/src/libc/pthread/pthread_rwlock_trywrlock.c … :-)
-
OK, I just misunderstood then. Thanks for the link.
-
On another note have you worked out details of safe self-synch'd destruction? I think article's sample impls have bugs
-
I think CloudABI's C library does that properly for condition variables, but not 100% sure about the kernel futex code
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.