ladybird/Libraries/LibPthread
Andreas Kling 4a8683ea68 Kernel+LibPthread+LibC: Add a naive futex and use it for pthread_cond_t
This patch implements a simple version of the futex (fast userspace
mutex) API in the kernel and uses it to make the pthread_cond_t API's
block instead of busily sched_yield().

An arbitrary userspace address is passed to the kernel as a "token"
that identifies the futex and you can then FUTEX_WAIT and FUTEX_WAKE
that specific userspace address.

FUTEX_WAIT corresponds to pthread_cond_wait() and FUTEX_WAKE is used
for pthread_cond_signal() and pthread_cond_broadcast().

I'm pretty sure I'm missing something in this implementation, but it's
hopefully okay for a start. :^)
2019-12-25 23:54:06 +01:00
..
Makefile Build: clean up build system, use one shared Makefile 2019-12-20 20:20:54 +01:00
pthread.cpp Kernel+LibPthread+LibC: Add a naive futex and use it for pthread_cond_t 2019-12-25 23:54:06 +01:00
pthread.h Kernel+LibPthread+LibC: Add a naive futex and use it for pthread_cond_t 2019-12-25 23:54:06 +01:00