Fix supported autotools versions in README.md
[librseq.git] / include / rseq / rseq-ppc-thread-pointer.h
1 /* SPDX-License-Identifier: MIT */
2 /* SPDX-FileCopyrightText: 2021 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */
3
4 /*
5 * rseq-ppc-thread-pointer.h
6 */
7
8 #ifndef _RSEQ_PPC_THREAD_POINTER
9 #define _RSEQ_PPC_THREAD_POINTER
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 static inline void *rseq_thread_pointer(void)
16 {
17 #ifdef __powerpc64__
18 register void *__result asm ("r13");
19 #else
20 register void *__result asm ("r2");
21 #endif
22 asm ("" : "=r" (__result));
23 return __result;
24 }
25
26 #ifdef __cplusplus
27 }
28 #endif
29
30 #endif
This page took 0.032499 seconds and 4 git commands to generate.