forward.cpp 971 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2021, Gunnar Beutner <gunnar@beutner.name>
  3. * Copyright (c) 2022, the SerenityOS developers.
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #include <LibC/bits/pthread_forward.h>
  8. static constexpr PthreadFunctions s_functions = {
  9. .pthread_mutex_trylock = pthread_mutex_trylock,
  10. .pthread_mutex_destroy = pthread_mutex_destroy,
  11. .pthread_mutexattr_init = pthread_mutexattr_init,
  12. .pthread_mutexattr_settype = pthread_mutexattr_settype,
  13. .pthread_mutexattr_destroy = pthread_mutexattr_destroy,
  14. .pthread_once = pthread_once,
  15. .pthread_cond_broadcast = pthread_cond_broadcast,
  16. .pthread_cond_init = pthread_cond_init,
  17. .pthread_cond_signal = pthread_cond_signal,
  18. .pthread_cond_wait = pthread_cond_wait,
  19. .pthread_cond_destroy = pthread_cond_destroy,
  20. .pthread_cond_timedwait = pthread_cond_timedwait,
  21. };
  22. [[gnu::constructor]] static void forward_pthread_functions()
  23. {
  24. __init_pthread_forward(s_functions);
  25. }