Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: LGPL-2.1-only OR MIT */
0002 /*
0003  * rseq-generic-thread-pointer.h
0004  *
0005  * (C) Copyright 2021 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
0006  */
0007 
0008 #ifndef _RSEQ_GENERIC_THREAD_POINTER
0009 #define _RSEQ_GENERIC_THREAD_POINTER
0010 
0011 #ifdef __cplusplus
0012 extern "C" {
0013 #endif
0014 
0015 /* Use gcc builtin thread pointer. */
0016 static inline void *rseq_thread_pointer(void)
0017 {
0018     return __builtin_thread_pointer();
0019 }
0020 
0021 #ifdef __cplusplus
0022 }
0023 #endif
0024 
0025 #endif