1 /* SPDX-License-Identifier: MIT */
2 /* SPDX-FileCopyrightText: 2021 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */
5 * rseq-x86-thread-pointer.h
8 #ifndef _RSEQ_X86_THREAD_POINTER
9 #define _RSEQ_X86_THREAD_POINTER
17 #if __GNUC_PREREQ (11, 1)
18 static inline void *rseq_thread_pointer(void)
20 return __builtin_thread_pointer();
23 static inline void *rseq_thread_pointer(void)
28 __asm__ ("mov %%fs:0, %0" : "=r" (__result
));
30 __asm__ ("mov %%gs:0, %0" : "=r" (__result
));
This page took 0.030476 seconds and 4 git commands to generate.