From 8e8a231a0754a688395d79d383b03fc0642bf1dc Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Wed, 27 Jul 2022 16:11:42 +0800 Subject: [PATCH] mapi: Move shared stub into u_current.c These stub are: _glapi_Dispatch _glapi_Context _glapi_destroy_multithread _glapi_check_multithread Signed-off-by: Yonggang Luo Reviewed-by: Emil Velikov Acked-by: Jose Fonseca Part-of: --- src/mapi/glapi/glapi.c | 15 ++------------- src/mapi/mapi_glapi.c | 16 ++-------------- src/mapi/u_current.c | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 27 deletions(-) diff --git a/src/mapi/glapi/glapi.c b/src/mapi/glapi/glapi.c index 44af484a377..b8479d2e27f 100644 --- a/src/mapi/glapi/glapi.c +++ b/src/mapi/glapi/glapi.c @@ -29,22 +29,11 @@ #include "u_current.h" /* + * _glapi_Dispatch, _glapi_Context * _glapi_tls_Dispatch, _glapi_tls_Context, * _glapi_set_context, _glapi_get_context, + * _glapi_destroy_multithread, _glapi_check_multithread * _glapi_set_dispatch, and _glapi_get_dispatch * are defined in u_current.c. */ -/* not used, but defined for compatibility */ -const struct _glapi_table *_glapi_Dispatch; -const void *_glapi_Context; - -void -_glapi_destroy_multithread(void) -{ -} - -void -_glapi_check_multithread(void) -{ -} diff --git a/src/mapi/mapi_glapi.c b/src/mapi/mapi_glapi.c index d89c94d9547..216a6987018 100644 --- a/src/mapi/mapi_glapi.c +++ b/src/mapi/mapi_glapi.c @@ -34,26 +34,14 @@ #include "stub.h" /* + * _glapi_Dispatch, _glapi_Context * _glapi_tls_Dispatch, _glapi_tls_Context, * _glapi_set_context, _glapi_get_context, + * _glapi_destroy_multithread, _glapi_check_multithread * _glapi_set_dispatch, and _glapi_get_dispatch * are defined in u_current.c. */ -/* not used, but defined for compatibility */ -const struct _glapi_table *_glapi_Dispatch; -const void *_glapi_Context; - -void -_glapi_destroy_multithread(void) -{ -} - -void -_glapi_check_multithread(void) -{ -} - /** * Return size of dispatch table struct as number of functions (or * slots). diff --git a/src/mapi/u_current.c b/src/mapi/u_current.c index ac7b8ab6789..d0c48d89300 100644 --- a/src/mapi/u_current.c +++ b/src/mapi/u_current.c @@ -99,8 +99,24 @@ __THREAD_INITIAL_EXEC struct _glapi_table *_glapi_tls_Dispatch __THREAD_INITIAL_EXEC void *_glapi_tls_Context; +/* not used, but defined for compatibility */ +const struct _glapi_table *_glapi_Dispatch; +const void *_glapi_Context; + /*@}*/ +/* not used, but defined for compatibility */ +void +_glapi_destroy_multithread(void) +{ +} + +/* not used, but defined for compatibility */ +void +_glapi_check_multithread(void) +{ +} + /** * Set the current context pointer for this thread. * The context pointer is an opaque type which should be cast to