libnx  v4.6.0
tls.h
Go to the documentation of this file.
1 /**
2  * @file tls.h
3  * @brief AArch64 thread local storage.
4  * @author plutoo
5  * @copyright libnx Authors
6  */
7 #pragma once
8 #include "../types.h"
9 
10 /**
11  * @brief Gets the thread local storage buffer.
12  * @return The thread local storage buffer.
13  */
14 static inline void* armGetTls(void) {
15  void* ret;
16  __asm__ ("mrs %x[data], tpidrro_el0" : [data] "=r" (ret));
17  return ret;
18 }
static void * armGetTls(void)
Gets the thread local storage buffer.
Definition: tls.h:14