diff options
author | Ian Romanick <[email protected]> | 2011-08-25 08:25:09 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-08-26 23:31:23 -0700 |
commit | 93db12a721ec2a68d99d68ea7fb9a471c2af23a0 (patch) | |
tree | 51e8ee5066aeec847a96365c94d7c9edcb90225d /src/mapi | |
parent | c30181c7c33f75d527c2c4dd1d77744027fc3ec6 (diff) |
mesa: Remove support for BeOS
Acked-by: Kristian Høgsberg <[email protected]>
Acked-by: Marek Olšák <[email protected]>
Acked-by: Alan Coopersmith <[email protected]>
Acked-by: Jakob Bornecrantz <[email protected]>
Acked-by: Dave Airlie <[email protected]>
Build-Tested-by: Jakob Bornecrantz <[email protected]>
Tested-by: Eugeni Dodonov <[email protected]>
Diffstat (limited to 'src/mapi')
-rw-r--r-- | src/mapi/glapi/gen/gl_x86-64_asm.py | 2 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_x86_asm.py | 2 | ||||
-rw-r--r-- | src/mapi/glapi/glapi_x86-64.S | 2 | ||||
-rw-r--r-- | src/mapi/glapi/glapi_x86.S | 2 | ||||
-rw-r--r-- | src/mapi/mapi/u_thread.c | 39 | ||||
-rw-r--r-- | src/mapi/mapi/u_thread.h | 58 |
6 files changed, 5 insertions, 100 deletions
diff --git a/src/mapi/glapi/gen/gl_x86-64_asm.py b/src/mapi/glapi/gen/gl_x86-64_asm.py index 11cd9af4061..ef759bf7bf3 100644 --- a/src/mapi/glapi/gen/gl_x86-64_asm.py +++ b/src/mapi/glapi/gen/gl_x86-64_asm.py @@ -138,7 +138,7 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '# define GL_PREFIX(n) GLNAME(CONCAT(gl,n))' print '# endif' print '' - print '#if defined(PTHREADS) || defined(WIN32) || defined(BEOS_THREADS)' + print '#if defined(PTHREADS) || defined(WIN32)' print '# define THREADS' print '#endif' print '' diff --git a/src/mapi/glapi/gen/gl_x86_asm.py b/src/mapi/glapi/gen/gl_x86_asm.py index 4ef4acb564e..b43b65dd829 100644 --- a/src/mapi/glapi/gen/gl_x86_asm.py +++ b/src/mapi/glapi/gen/gl_x86_asm.py @@ -78,7 +78,7 @@ class PrintGenericStubs(gl_XML.gl_print_base): print '#define GLOBL_FN(x) GLOBL x' print '#endif' print '' - print '#if defined(PTHREADS) || defined(WIN32) || defined(BEOS_THREADS)' + print '#if defined(PTHREADS) || defined(WIN32)' print '# define THREADS' print '#endif' print '' diff --git a/src/mapi/glapi/glapi_x86-64.S b/src/mapi/glapi/glapi_x86-64.S index ce54755c544..0746eabc640 100644 --- a/src/mapi/glapi/glapi_x86-64.S +++ b/src/mapi/glapi/glapi_x86-64.S @@ -45,7 +45,7 @@ # define GL_PREFIX(n) GLNAME(CONCAT(gl,n)) # endif -#if defined(PTHREADS) || defined(WIN32) || defined(BEOS_THREADS) +#if defined(PTHREADS) || defined(WIN32) # define THREADS #endif diff --git a/src/mapi/glapi/glapi_x86.S b/src/mapi/glapi/glapi_x86.S index 862dc92681f..ea30e99604a 100644 --- a/src/mapi/glapi/glapi_x86.S +++ b/src/mapi/glapi/glapi_x86.S @@ -51,7 +51,7 @@ #define GLOBL_FN(x) GLOBL x #endif -#if defined(PTHREADS) || defined(WIN32) || defined(BEOS_THREADS) +#if defined(PTHREADS) || defined(WIN32) # define THREADS #endif diff --git a/src/mapi/mapi/u_thread.c b/src/mapi/mapi/u_thread.c index 12e748fe8ba..7b52ca99b3a 100644 --- a/src/mapi/mapi/u_thread.c +++ b/src/mapi/mapi/u_thread.c @@ -169,45 +169,6 @@ u_tsd_set(struct u_tsd *tsd, void *ptr) #endif /* WIN32 */ -/* - * BeOS threads - */ -#ifdef BEOS_THREADS - -unsigned long -u_thread_self(void) -{ - return (unsigned long) find_thread(NULL); -} - -void -u_tsd_init(struct u_tsd *tsd) -{ - tsd->key = tls_allocate(); - tsd->initMagic = INIT_MAGIC; -} - -void * -u_tsd_get(struct u_tsd *tsd) -{ - if (tsd->initMagic != (int) INIT_MAGIC) { - u_tsd_init(tsd); - } - return tls_get(tsd->key); -} - -void -u_tsd_set(struct u_tsd *tsd, void *ptr) -{ - if (tsd->initMagic != (int) INIT_MAGIC) { - u_tsd_init(tsd); - } - tls_set(tsd->key, ptr); -} - -#endif /* BEOS_THREADS */ - - #else /* THREADS */ diff --git a/src/mapi/mapi/u_thread.h b/src/mapi/mapi/u_thread.h index 1cc8be3fa3f..4405ec9c509 100644 --- a/src/mapi/mapi/u_thread.h +++ b/src/mapi/mapi/u_thread.h @@ -44,7 +44,7 @@ #include "u_compiler.h" -#if defined(PTHREADS) || defined(WIN32) || defined(BEOS_THREADS) +#if defined(PTHREADS) || defined(WIN32) #ifndef THREADS #define THREADS #endif @@ -108,62 +108,6 @@ typedef CRITICAL_SECTION u_mutex; /* - * BeOS threads. R5.x required. - */ -#ifdef BEOS_THREADS - -/* Problem with OS.h and this file on haiku */ -#ifndef __HAIKU__ -#include <kernel/OS.h> -#endif - -#include <support/TLS.h> - -/* The only two typedefs required here - * this is cause of the OS.h problem - */ -#ifdef __HAIKU__ -typedef int32 thread_id; -typedef int32 sem_id; -#endif - -struct u_tsd { - int32 key; - int initMagic; -}; - -/* Use Benaphore, aka speeder semaphore */ -typedef struct { - int32 lock; - sem_id sem; -} benaphore; -typedef benaphore u_mutex; - -#define u_mutex_declare_static(name) \ - static u_mutex name = { 0, 0 } - -#define u_mutex_init(name) \ - name.sem = create_sem(0, #name"_benaphore"), \ - name.lock = 0 - -#define u_mutex_destroy(name) \ - delete_sem(name.sem), \ - name.lock = 0 - -#define u_mutex_lock(name) \ - if (name.sem == 0) \ - u_mutex_init(name); \ - if (atomic_add(&(name.lock), 1) >= 1) \ - acquire_sem(name.sem) - -#define u_mutex_unlock(name) \ - if (atomic_add(&(name.lock), -1) > 1) \ - release_sem(name.sem) - -#endif /* BEOS_THREADS */ - - -/* * THREADS not defined */ #ifndef THREADS |