diff options
author | Yonggang Luo <luoyonggang@gmail.com> | 2022-07-27 16:30:55 +0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-08-22 21:32:09 +0000 |
commit | 7981936e46e8a714fb6a3b01d70bd235de9f0e59 (patch) | |
tree | 2484391581e90093f52fc50adc5851154cabc36b /src/mapi | |
parent | 1d3faf7706504ee448362a2bb96ce4be8ce60097 (diff) |
mapi: Improve comment about _glapi_tls_Dispatch and _glapi_tls_Context
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>
Diffstat (limited to 'src/mapi')
-rw-r--r-- | src/mapi/u_current.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/mapi/u_current.c b/src/mapi/u_current.c index d0c48d89300..ba6671214c9 100644 --- a/src/mapi/u_current.c +++ b/src/mapi/u_current.c @@ -72,25 +72,17 @@ extern void (*__glapi_noop_table[])(void); * * Depending on whether or not multithreading is support, and the type of * support available, several variables are used to store the current context - * pointer and the current dispatch table pointer. In the non-threaded case, + * pointer and the current dispatch table pointer. In the non-threaded case, * the variables \c _glapi_Dispatch and \c _glapi_Context are used for this * purpose. * - * In the "normal" threaded case, the variables \c _glapi_Dispatch and - * \c _glapi_Context will be \c NULL if an application is detected as being - * multithreaded. Single-threaded applications will use \c _glapi_Dispatch - * and \c _glapi_Context just like the case without any threading support. - * When \c _glapi_Dispatch and \c _glapi_Context are \c NULL, the thread state - * data \c _gl_DispatchTSD and \c ContextTSD are used. Drivers and the + * In multi threaded case, The TLS variables \c _glapi_tls_Dispatch and + * \c _glapi_tls_Context are used. Having \c _glapi_Dispatch and \c _glapi_Context + * be hardcoded to \c NULL maintains binary compatability between TLS enabled + * loaders and non-TLS DRI drivers. When \c _glapi_Dispatch and \c _glapi_Context + * are \c NULL, the thread state data \c ContextTSD are used. Drivers and the * static dispatch functions access these variables via \c _glapi_get_dispatch * and \c _glapi_get_context. - * - * - * In the TLS case, the variables \c _glapi_Dispatch and \c _glapi_Context are - * hardcoded to \c NULL. Instead the TLS variables \c _glapi_tls_Dispatch and - * \c _glapi_tls_Context are used. Having \c _glapi_Dispatch and - * \c _glapi_Context be hardcoded to \c NULL maintains binary compatability - * between TLS enabled loaders and non-TLS DRI drivers. */ /*@{*/ |