@ed_maste Maybe I'm missing something but your "futexes" look like they need syscalls for every op, opposite of futex.
-
-
Replying to @RichFelker @ed_maste
Non-blocking ops are separate syscalls. Blocking ops are integrated in polling. That allows for timeouts, etc.
1 reply 0 retweets 0 likes -
Replying to @EdSchouten @ed_maste
If nonblocking ops need syscalls it's not a futex, just a classic slow kernel-based mutex...
1 reply 0 retweets 0 likes -
Replying to @RichFelker @ed_maste
The nonblocking ops are wakeups. Only invoked when mutexes/condvars have waiters. Same as with Linux futexes.
1 reply 0 retweets 0 likes -
Replying to @EdSchouten @ed_maste
I meant trylock or unconfended lock ops.
1 reply 0 retweets 0 likes -
Replying to @RichFelker @ed_maste
That's also done in userspace entirely. Check out https://github.com/NuxiNL/cloudlibc/blob/master/src/libc/pthread/pthread_rwlock_trywrlock.c … :-)
1 reply 0 retweets 0 likes -
Replying to @EdSchouten @ed_maste
OK, I just misunderstood then. Thanks for the link.
1 reply 0 retweets 0 likes -
On another note have you worked out details of safe self-synch'd destruction? I think article's sample impls have bugs
1 reply 0 retweets 0 likes -
Replying to @RichFelker @ed_maste
I think CloudABI's C library does that properly for condition variables, but not 100% sure about the kernel futex code
2 replies 0 retweets 0 likes -
Replying to @EdSchouten @ed_maste
In most cases, once you make the atomic change that releases other threads, you can't touch that memory again.
1 reply 0 retweets 0 likes
This is because by the time you make any subsequent access it may have been destroyed/freed/reused.
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.