1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:08:13 +00:00

Revert "Userland: static vs non-static constexpr variables"

This reverts commit 800ea8ea96.

Booting the system no longer worked after these changes.
This commit is contained in:
Linus Groh 2021-05-21 10:30:21 +01:00
parent 68f76b9e37
commit d60ebbbba6
38 changed files with 184 additions and 192 deletions

View file

@ -6,24 +6,25 @@
#include <LibC/bits/pthread_forward.h>
static const PthreadFunctions s_functions = {
.pthread_mutex_trylock = pthread_mutex_trylock,
.pthread_mutex_destroy = pthread_mutex_destroy,
.pthread_mutexattr_init = pthread_mutexattr_init,
.pthread_mutexattr_settype = pthread_mutexattr_settype,
.pthread_mutexattr_destroy = pthread_mutexattr_destroy,
.pthread_once = pthread_once,
.pthread_cond_broadcast = pthread_cond_broadcast,
.pthread_cond_init = pthread_cond_init,
.pthread_cond_signal = pthread_cond_signal,
.pthread_cond_wait = pthread_cond_wait,
.pthread_cond_destroy = pthread_cond_destroy,
.pthread_cond_timedwait = pthread_cond_timedwait,
};
[[gnu::constructor]] static void forward_pthread_functions()
{
constexpr PthreadFunctions s_functions = {
.pthread_mutex_trylock = pthread_mutex_trylock,
.pthread_mutex_destroy = pthread_mutex_destroy,
.pthread_mutexattr_init = pthread_mutexattr_init,
.pthread_mutexattr_settype = pthread_mutexattr_settype,
.pthread_mutexattr_destroy = pthread_mutexattr_destroy,
.pthread_once = pthread_once,
.pthread_cond_broadcast = pthread_cond_broadcast,
.pthread_cond_init = pthread_cond_init,
.pthread_cond_signal = pthread_cond_signal,
.pthread_cond_wait = pthread_cond_wait,
.pthread_cond_destroy = pthread_cond_destroy,
.pthread_cond_timedwait = pthread_cond_timedwait,
};
__init_pthread_forward(s_functions);
}