diff options
Diffstat (limited to 'src/mesa/glapi')
-rw-r--r-- | src/mesa/glapi/descrip.mms | 39 | ||||
-rw-r--r-- | src/mesa/glapi/glapi.c | 4 | ||||
-rw-r--r-- | src/mesa/glapi/glthread.c | 6 | ||||
-rw-r--r-- | src/mesa/glapi/glthread.h | 48 |
4 files changed, 50 insertions, 47 deletions
diff --git a/src/mesa/glapi/descrip.mms b/src/mesa/glapi/descrip.mms deleted file mode 100644 index ee96baa6fcc..00000000000 --- a/src/mesa/glapi/descrip.mms +++ /dev/null @@ -1,39 +0,0 @@ -# Makefile for core library for VMS -# contributed by Jouk Jansen [email protected] -# Last revision : 29 September 2008 - -.first - define gl [---.include.gl] - define main [-.main] - -.include [---]mms-config. - -##### MACROS ##### - -VPATH = RCS - -INCDIR = [---.include],[-.main] -LIBDIR = [---.lib] -CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)/float=ieee/ieee=denorm - -SOURCES = glapi.c glthread.c glapi_getproc.c - -OBJECTS = glapi.obj,glthread.obj,glapi_getproc.obj - -##### RULES ##### - -VERSION=Mesa V3.4 - -##### TARGETS ##### -# Make the library -$(LIBDIR)$(GL_LIB) : $(OBJECTS) - @ library $(LIBDIR)$(GL_LIB) $(OBJECTS) - -clean : - purge - delete *.obj;* - -glapi.obj : glapi.c - -glthread.obj : glthread.c -glapi_getproc.obj : glapi_getproc.c diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c index c3ebf60719f..9b5144a88b6 100644 --- a/src/mesa/glapi/glapi.c +++ b/src/mesa/glapi/glapi.c @@ -98,6 +98,7 @@ _glapi_set_warning_func( _glapi_warning_func func ) static GLboolean warn(void) { +#if !defined(_WIN32_WCE) if ((WarnFlag || getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) && warning_func) { return GL_TRUE; @@ -105,6 +106,9 @@ warn(void) else { return GL_FALSE; } +#else + return GL_FALSE; +#endif } diff --git a/src/mesa/glapi/glthread.c b/src/mesa/glapi/glthread.c index b818f4e26eb..56ddf7c25ac 100644 --- a/src/mesa/glapi/glthread.c +++ b/src/mesa/glapi/glthread.c @@ -25,16 +25,14 @@ /* * XXX There's probably some work to do in order to make this file - * truly reusable outside of Mesa. + * truly reusable outside of Mesa. First, the glheader.h include must go. */ - #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif -#include <stdlib.h> -#include <stdio.h> +#include "main/glheader.h" #include "glthread.h" diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h index e2765cebb10..ad2a63584b7 100644 --- a/src/mesa/glapi/glthread.h +++ b/src/mesa/glapi/glthread.h @@ -116,9 +116,49 @@ typedef pthread_mutex_t _glthread_Mutex; #define _glthread_UNLOCK_MUTEX(name) \ (void) pthread_mutex_unlock(&(name)) -#endif /* PTHREADS */ +typedef pthread_cond_t _glthread_Cond; +#define _glthread_DECLARE_STATIC_COND(name) \ + static _glthread_Cond name = PTHREAD_COND_INITIALIZER +#define _glthread_INIT_COND(cond) \ + pthread_cond_init(&(cond), NULL) + +#define _glthread_DESTROY_COND(name) \ + pthread_cond_destroy(&(name)) + +#define _glthread_COND_WAIT(cond, mutex) \ + pthread_cond_wait(&(cond), &(mutex)) + +#define _glthread_COND_SIGNAL(cond) \ + pthread_cond_signal(&(cond)) + +#define _glthread_COND_BROADCAST(cond) \ + pthread_cond_broadcast(&(cond)) + + +#else /* PTHREADS */ + +typedef unsigned int _glthread_Cond; +#define _glthread_DECLARE_STATIC_COND(name) \ +// #warning Condition variables not implemented. + +#define _glthread_INIT_COND(cond) \ + ASSERT(0); + +#define _glthread_DESTROY_COND(name) \ + ASSERT(0); + +#define _glthread_COND_WAIT(cond, mutex) \ + ASSERT(0); + +#define _glthread_COND_SIGNAL(cond) \ + ASSERT(0); + +#define _glthread_COND_BROADCAST(cond) \ + ASSERT(0); + +#endif /* @@ -259,11 +299,11 @@ typedef benaphore _glthread_Mutex; * THREADS not defined */ -typedef int _glthread_TSD; +typedef GLuint _glthread_TSD; -typedef int _glthread_Thread; +typedef GLuint _glthread_Thread; -typedef int _glthread_Mutex; +typedef GLuint _glthread_Mutex; #define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0 |