rseq-generic-thread-pointer.h 447 B

12345678910111213141516171819202122232425
  1. /* SPDX-License-Identifier: LGPL-2.1-only OR MIT */
  2. /*
  3. * rseq-generic-thread-pointer.h
  4. *
  5. * (C) Copyright 2021 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  6. */
  7. #ifndef _RSEQ_GENERIC_THREAD_POINTER
  8. #define _RSEQ_GENERIC_THREAD_POINTER
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. /* Use gcc builtin thread pointer. */
  13. static inline void *rseq_thread_pointer(void)
  14. {
  15. return __builtin_thread_pointer();
  16. }
  17. #ifdef __cplusplus
  18. }
  19. #endif
  20. #endif