Mesa (master): glapi: rename u_current dispatch table functions

Brian Paul brianp at kemper.freedesktop.org
Thu Mar 6 14:50:51 UTC 2014


Module: Mesa
Branch: master
Commit: 846a7e86309ab3877af6b7d3a63880468dfacbd3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=846a7e86309ab3877af6b7d3a63880468dfacbd3

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Mar  5 07:47:41 2014 -0700

glapi: rename u_current dispatch table functions

Put "table" in the names to make things more understandable.

Reviewed-by: Chia-I Wu <olv at lunarg.com>

---

 src/mapi/entry.c       |    4 ++--
 src/mapi/glapi/glapi.c |    2 +-
 src/mapi/mapi.c        |    2 +-
 src/mapi/mapi_glapi.c  |    2 +-
 src/mapi/u_current.c   |    6 +++---
 src/mapi/u_current.h   |   10 +++++-----
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/mapi/entry.c b/src/mapi/entry.c
index 128f011..b6e8db2 100644
--- a/src/mapi/entry.c
+++ b/src/mapi/entry.c
@@ -36,7 +36,7 @@
 #ifdef MAPI_MODE_BRIDGE
 #define ENTRY_CURRENT_TABLE_GET "_glapi_get_dispatch"
 #else
-#define ENTRY_CURRENT_TABLE_GET U_STRINGIFY(u_current_get_internal)
+#define ENTRY_CURRENT_TABLE_GET U_STRINGIFY(u_current_get_table_internal)
 #endif
 
 #if defined(USE_X86_ASM) && defined(__GNUC__)
@@ -57,7 +57,7 @@ entry_current_get(void)
 #ifdef MAPI_MODE_BRIDGE
    return GET_DISPATCH();
 #else
-   return u_current_get();
+   return u_current_get_table();
 #endif
 }
 
diff --git a/src/mapi/glapi/glapi.c b/src/mapi/glapi/glapi.c
index 231bdad..194b9ee 100644
--- a/src/mapi/glapi/glapi.c
+++ b/src/mapi/glapi/glapi.c
@@ -60,5 +60,5 @@ _glapi_set_context(void *context)
 void
 _glapi_set_dispatch(struct _glapi_table *dispatch)
 {
-   u_current_set((const struct mapi_table *) dispatch);
+   u_current_set_table((const struct mapi_table *) dispatch);
 }
diff --git a/src/mapi/mapi.c b/src/mapi/mapi.c
index 56f209b..6f1b35f 100644
--- a/src/mapi/mapi.c
+++ b/src/mapi/mapi.c
@@ -186,5 +186,5 @@ mapi_table_fill(struct mapi_table *tbl, const mapi_proc *procs)
 void
 mapi_table_make_current(const struct mapi_table *tbl)
 {
-   u_current_set(tbl);
+   u_current_set_table(tbl);
 }
diff --git a/src/mapi/mapi_glapi.c b/src/mapi/mapi_glapi.c
index d345f2a..7b0903b 100644
--- a/src/mapi/mapi_glapi.c
+++ b/src/mapi/mapi_glapi.c
@@ -64,7 +64,7 @@ _glapi_set_context(void *context)
 void
 _glapi_set_dispatch(struct _glapi_table *dispatch)
 {
-   u_current_set((const struct mapi_table *) dispatch);
+   u_current_set_table((const struct mapi_table *) dispatch);
 }
 
 /**
diff --git a/src/mapi/u_current.c b/src/mapi/u_current.c
index 72190fe..76dae91 100644
--- a/src/mapi/u_current.c
+++ b/src/mapi/u_current.c
@@ -168,7 +168,7 @@ u_current_init(void)
    }
    else if (knownID != u_thread_self()) {
       ThreadSafe = 1;
-      u_current_set(NULL);
+      u_current_set_table(NULL);
       u_current_set_context(NULL);
    }
    u_mutex_unlock(ThreadCheckMutex);
@@ -230,7 +230,7 @@ u_current_get_context_internal(void)
  * table (__glapi_noop_table).
  */
 void
-u_current_set(const struct mapi_table *tbl)
+u_current_set_table(const struct mapi_table *tbl)
 {
    u_current_init();
 
@@ -253,7 +253,7 @@ u_current_set(const struct mapi_table *tbl)
  * Return pointer to current dispatch table for calling thread.
  */
 struct mapi_table *
-u_current_get_internal(void)
+u_current_get_table_internal(void)
 {
 #if defined(GLX_USE_TLS)
    return u_current_table;
diff --git a/src/mapi/u_current.h b/src/mapi/u_current.h
index 6709af2..72708d4 100644
--- a/src/mapi/u_current.h
+++ b/src/mapi/u_current.h
@@ -17,7 +17,7 @@
 #define u_current_context _glapi_Context
 #endif
 
-#define u_current_get_internal _glapi_get_dispatch
+#define u_current_get_table_internal _glapi_get_dispatch
 #define u_current_get_context_internal _glapi_get_context
 
 #define u_current_table_tsd _gl_DispatchTSD
@@ -52,10 +52,10 @@ void
 u_current_destroy(void);
 
 void
-u_current_set(const struct mapi_table *tbl);
+u_current_set_table(const struct mapi_table *tbl);
 
 struct mapi_table *
-u_current_get_internal(void);
+u_current_get_table_internal(void);
 
 void
 u_current_set_context(const void *ptr);
@@ -64,13 +64,13 @@ void *
 u_current_get_context_internal(void);
 
 static INLINE const struct mapi_table *
-u_current_get(void)
+u_current_get_table(void)
 {
 #ifdef GLX_USE_TLS
    return u_current_table;
 #else
    return (likely(u_current_table) ?
-         u_current_table : u_current_get_internal());
+         u_current_table : u_current_get_table_internal());
 #endif
 }
 




More information about the mesa-commit mailing list