2010-04-23 09:06:26 +01:00
|
|
|
#ifndef _U_CURRENT_H_
|
|
|
|
#define _U_CURRENT_H_
|
|
|
|
|
2015-03-04 00:15:05 +00:00
|
|
|
#include "util/macros.h"
|
|
|
|
|
|
|
|
|
2010-12-16 16:24:27 +00:00
|
|
|
#if defined(MAPI_MODE_UTIL) || defined(MAPI_MODE_GLAPI) || \
|
|
|
|
defined(MAPI_MODE_BRIDGE)
|
2010-04-23 09:06:26 +01:00
|
|
|
|
2010-08-21 04:50:22 +01:00
|
|
|
#include "glapi/glapi.h"
|
|
|
|
|
2010-12-10 09:14:04 +00:00
|
|
|
#define u_current_table _glapi_tls_Dispatch
|
2014-03-05 14:47:41 +00:00
|
|
|
#define u_current_context _glapi_tls_Context
|
2010-08-21 05:10:02 +01:00
|
|
|
|
2014-03-05 14:47:41 +00:00
|
|
|
#define u_current_get_table_internal _glapi_get_dispatch
|
2014-03-05 14:47:41 +00:00
|
|
|
#define u_current_get_context_internal _glapi_get_context
|
2010-08-21 05:10:02 +01:00
|
|
|
|
|
|
|
#define u_current_table_tsd _gl_DispatchTSD
|
|
|
|
|
2010-12-16 16:24:27 +00:00
|
|
|
#else /* MAPI_MODE_UTIL || MAPI_MODE_GLAPI || MAPI_MODE_BRIDGE */
|
2010-04-23 09:06:26 +01:00
|
|
|
|
2017-04-13 18:23:50 +01:00
|
|
|
struct _glapi_table;
|
2010-04-23 09:06:26 +01:00
|
|
|
|
2021-05-21 21:23:07 +01:00
|
|
|
extern __THREAD_INITIAL_EXEC struct _glapi_table *u_current_table;
|
|
|
|
extern __THREAD_INITIAL_EXEC void *u_current_context;
|
2010-04-23 09:06:26 +01:00
|
|
|
|
2010-12-16 16:24:27 +00:00
|
|
|
#endif /* MAPI_MODE_UTIL || MAPI_MODE_GLAPI || MAPI_MODE_BRIDGE */
|
2010-12-10 09:14:04 +00:00
|
|
|
|
2010-08-21 04:50:22 +01:00
|
|
|
void
|
2017-04-13 18:23:50 +01:00
|
|
|
u_current_set_table(const struct _glapi_table *tbl);
|
2010-04-23 09:06:26 +01:00
|
|
|
|
2021-09-01 14:57:40 +01:00
|
|
|
_GLAPI_EXPORT struct _glapi_table *
|
2014-03-05 14:47:41 +00:00
|
|
|
u_current_get_table_internal(void);
|
2010-04-23 09:06:26 +01:00
|
|
|
|
|
|
|
void
|
2014-03-05 14:47:41 +00:00
|
|
|
u_current_set_context(const void *ptr);
|
2010-04-23 09:06:26 +01:00
|
|
|
|
2021-09-01 14:57:40 +01:00
|
|
|
_GLAPI_EXPORT void *
|
2014-03-05 14:47:41 +00:00
|
|
|
u_current_get_context_internal(void);
|
2010-04-23 09:06:26 +01:00
|
|
|
|
2010-08-21 04:50:22 +01:00
|
|
|
#endif /* _U_CURRENT_H_ */
|