summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-03-07 21:50:41 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-03-07 21:50:41 +0000
commit5104b4d9df28f5bcb879b16bf5cef4ab0addda85 (patch)
tree13b6cd4144ea305718fb5f6a19f43044f26c0159 /src/mesa
parent0b2fa873c6da02f169a76d74d3bedd91236f8e28 (diff)
minor patches from David Dawes
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/glapi/glapi.c13
-rw-r--r--src/mesa/glapi/glthread.h7
2 files changed, 12 insertions, 8 deletions
diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c
index 4463325930..d962df37e2 100644
--- a/src/mesa/glapi/glapi.c
+++ b/src/mesa/glapi/glapi.c
@@ -1,10 +1,10 @@
-/* $Id: glapi.c,v 1.60 2001/12/04 23:43:31 brianp Exp $ */
+/* $Id: glapi.c,v 1.61 2002/03/07 21:50:41 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 4.1
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -194,8 +194,7 @@ str_dup(const char *str)
/*
* We should call this periodically from a function such as glXMakeCurrent
- * in order to test if multiple threads are being used. When we detect
- * that situation we should then call _glapi_enable_thread_safety()
+ * in order to test if multiple threads are being used.
*/
void
_glapi_check_multithread(void)
@@ -789,11 +788,12 @@ _glapi_get_proc_name(GLuint offset)
/*
* Make sure there are no NULL pointers in the given dispatch table.
- * Intented for debugging purposes.
+ * Intended for debugging purposes.
*/
void
_glapi_check_table(const struct _glapi_table *table)
{
+#ifdef DEBUG
const GLuint entries = _glapi_get_dispatch_table_size();
const void **tab = (const void **) table;
GLuint i;
@@ -801,7 +801,6 @@ _glapi_check_table(const struct _glapi_table *table)
assert(tab[i]);
}
-#ifdef DEBUG
/* Do some spot checks to be sure that the dispatch table
* slots are assigned correctly.
*/
diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h
index 026578051e..1b2a648da8 100644
--- a/src/mesa/glapi/glthread.h
+++ b/src/mesa/glapi/glthread.h
@@ -1,4 +1,4 @@
-/* $Id: glthread.h,v 1.10 2001/11/30 22:11:45 kschultz Exp $ */
+/* $Id: glthread.h,v 1.11 2002/03/07 21:50:41 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -186,8 +186,13 @@ typedef xthread_t _glthread_Thread;
typedef xmutex_rec _glthread_Mutex;
+#ifdef XMUTEX_INITIALIZER
#define _glthread_DECLARE_STATIC_MUTEX(name) \
static _glthread_Mutex name = XMUTEX_INITIALIZER
+#else
+#define _glthread_DECLARE_STATIC_MUTEX(name) \
+ static _glthread_Mutex name
+#endif
#define _glthread_INIT_MUTEX(name) \
xmutex_init(&(name))