ladybird/Userland/Libraries/LibPthread
Jelle Raaijmakers 30580ed7e4 LibPthread: Initialize conditions with realtime clock
All the way back in commit 1670ee5aba, the default clock for
condition variables was set to `CLOCK_MONOTONIC`, because there was no
other clock available.

However, if a condition variable is initialized without any additional
attributes by an application, they sometimes assume that the absolute
time that is passed to e.g. `pthread_cond_timedwait` is actually based
on a realtime clock, as can be seen here in SDL2:

6f419bdf5f/src/thread/pthread/SDL_syscond.c (L99)

Additionally, the glibc implementation defaults to a realtime clock:

aac54dcd37/nptl/pthread_cond_init.c (L42)

...so we probably should do so as well :^)
2021-11-24 19:44:57 +01:00
..
CMakeLists.txt LibPthread: Reimplement condition variables 2021-07-05 20:26:01 +02:00
forward.cpp Revert "Userland: static vs non-static constexpr variables" 2021-05-21 10:30:52 +01:00
pthread_cond.cpp LibPthread: Initialize conditions with realtime clock 2021-11-24 19:44:57 +01:00
pthread_once.cpp LibC+LibPthread: Use FUTEX_PRIVATE_FLAG in more places 2021-07-07 17:08:40 +02:00
pthread.cpp LibPthread: Correct nonsensical loop exit condition in RWLock unlock 2021-09-28 12:34:51 +03:30
pthread.h LibC+LibPthread: Add PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP 2021-07-05 23:30:15 +02:00
semaphore.cpp LibPthread: Fix some assertions 2021-07-06 17:25:34 +02:00
semaphore.h LibPthread: Reimplement semaphores 2021-07-05 20:26:01 +02:00