pt-spin-inlines.c 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* Spin locks non-inline functions.
  2. Copyright (C) 2000-2026 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <https://www.gnu.org/licenses/>. */
  15. /* <bits/types/__pthread_spinlock_t.h> declares some extern inline functions. These
  16. functions are declared additionally here for use when inlining is
  17. not possible. */
  18. #define _FORCE_INLINES
  19. #define __PT_SPIN_INLINE /* empty */
  20. #include <pthread.h>
  21. #include <shlib-compat.h>
  22. libc_hidden_def (__pthread_spin_destroy)
  23. versioned_symbol (libc, __pthread_spin_destroy, pthread_spin_destroy, GLIBC_2_43);
  24. #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43)
  25. compat_symbol (libc, __pthread_spin_destroy, pthread_spin_destroy, GLIBC_2_12);
  26. #endif
  27. libc_hidden_def (__pthread_spin_init)
  28. versioned_symbol (libc, __pthread_spin_init, pthread_spin_init, GLIBC_2_43);
  29. #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43)
  30. compat_symbol (libc, __pthread_spin_init, pthread_spin_init, GLIBC_2_12);
  31. #endif
  32. libc_hidden_def (__pthread_spin_trylock)
  33. versioned_symbol (libc, __pthread_spin_trylock, pthread_spin_trylock, GLIBC_2_43);
  34. #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43)
  35. compat_symbol (libc, __pthread_spin_trylock, pthread_spin_trylock, GLIBC_2_12);
  36. #endif
  37. libc_hidden_def (__pthread_spin_lock)
  38. versioned_symbol (libc, __pthread_spin_lock, pthread_spin_lock, GLIBC_2_43);
  39. #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43)
  40. compat_symbol (libc, __pthread_spin_lock, pthread_spin_lock, GLIBC_2_12);
  41. #endif
  42. libc_hidden_def (__pthread_spin_unlock)
  43. versioned_symbol (libc, __pthread_spin_unlock, pthread_spin_unlock, GLIBC_2_43);
  44. #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_43)
  45. compat_symbol (libc, __pthread_spin_unlock, pthread_spin_unlock, GLIBC_2_12);
  46. #endif