1 #ifndef _U_CURRENT_H_ 2 #define _U_CURRENT_H_ 3 4 #include "util/macros.h" 5 6 7 #if defined(MAPI_MODE_UTIL) || defined(MAPI_MODE_GLAPI) || \ 8 defined(MAPI_MODE_BRIDGE) 9 10 #include "glapi/glapi.h" 11 12 #define u_current_table _glapi_tls_Dispatch 13 #define u_current_context _glapi_tls_Context 14 15 #define u_current_get_table_internal _glapi_get_dispatch 16 #define u_current_get_context_internal _glapi_get_context 17 18 #define u_current_table_tsd _gl_DispatchTSD 19 20 #else /* MAPI_MODE_UTIL || MAPI_MODE_GLAPI || MAPI_MODE_BRIDGE */ 21 22 struct _glapi_table; 23 24 extern __THREAD_INITIAL_EXEC struct _glapi_table *u_current_table; 25 extern __THREAD_INITIAL_EXEC void *u_current_context; 26 27 #endif /* MAPI_MODE_UTIL || MAPI_MODE_GLAPI || MAPI_MODE_BRIDGE */ 28 29 void 30 u_current_set_table(const struct _glapi_table *tbl); 31 32 _GLAPI_EXPORT struct _glapi_table * 33 u_current_get_table_internal(void); 34 35 void 36 u_current_set_context(const void *ptr); 37 38 _GLAPI_EXPORT void * 39 u_current_get_context_internal(void); 40 41 #endif /* _U_CURRENT_H_ */ 42