1 #include "main/glheader.h"
2 #include "main/compiler.h"
3 #include "glapi/glapi.h"
5 /* This is just supposed to make sure we get a reference to
6 the driver entry symbol that the compiler doesn't optimize away */
8 extern char __driDriverExtensions
[];
10 /* provide glapi symbols */
12 #if defined(GLX_USE_TLS)
14 PUBLIC __thread
struct _glapi_table
* _glapi_tls_Dispatch
15 __attribute__((tls_model("initial-exec")));
17 PUBLIC __thread
void * _glapi_tls_Context
18 __attribute__((tls_model("initial-exec")));
20 PUBLIC
const struct _glapi_table
*_glapi_Dispatch
;
21 PUBLIC
const void *_glapi_Context
;
25 PUBLIC
struct _glapi_table
*_glapi_Dispatch
;
26 PUBLIC
void *_glapi_Context
;
31 _glapi_check_multithread(void)
35 _glapi_set_context(void *context
)
39 _glapi_get_context(void)
45 _glapi_set_dispatch(struct _glapi_table
*dispatch
)
48 PUBLIC
struct _glapi_table
*
49 _glapi_get_dispatch(void)
55 _glapi_add_dispatch( const char * const * function_names
,
56 const char * parameter_signature
)
62 _glapi_get_proc_offset(const char *funcName
)
68 _glapi_get_proc_address(const char *funcName
)
74 _glapi_get_dispatch_table_size(void)
80 _glapi_set_nop_handler(_glapi_nop_handler_proc func
)
84 PUBLIC
struct _glapi_table
*
85 _glapi_new_nop_table(unsigned num_entries
)
91 int main(int argc
, char** argv
)
93 void* p
= __driDriverExtensions
;
94 return (int)(unsigned long)p
;