26 lines · c
1/* SPDX-License-Identifier: LGPL-2.1-only OR MIT */2/*3 * rseq-generic-thread-pointer.h4 *5 * (C) Copyright 2021 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>6 */7 8#ifndef _RSEQ_GENERIC_THREAD_POINTER9#define _RSEQ_GENERIC_THREAD_POINTER10 11#ifdef __cplusplus12extern "C" {13#endif14 15/* Use gcc builtin thread pointer. */16static inline void *rseq_thread_pointer(void)17{18 return __builtin_thread_pointer();19}20 21#ifdef __cplusplus22}23#endif24 25#endif26