forward.cpp 917 B

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