summaryrefslogtreecommitdiff
path: root/glx/glthread.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2011-03-02 11:17:07 -0500
committerAdam Jackson <ajax@redhat.com>2011-03-08 13:22:01 -0500
commit2371b44f9eb9181ec2c081ce66befee51d18bf6e (patch)
treea89f64aacb2b8540512c0a27f43f60bdcbd3ecf1 /glx/glthread.c
parenta5fdd1aa06c7c8ecefeafafc4a778fc816ad41a4 (diff)
glx: unifdef SOLARIS_THREADS
Solaris 7 and older are not supported; Solaris 8 and later have (and use) pthreads. Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'glx/glthread.c')
-rw-r--r--glx/glthread.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/glx/glthread.c b/glx/glthread.c
index 8b9f61885..2d76a49b7 100644
--- a/glx/glthread.c
+++ b/glx/glthread.c
@@ -114,76 +114,6 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
#endif /* PTHREADS */
-
-
-/*
- * Solaris/Unix International Threads -- Use only if POSIX threads
- * aren't available on your Unix platform. Solaris 2.[34] are examples
- * of platforms where this is the case. Be sure to use -mt and/or
- * -D_REENTRANT when compiling.
- */
-#ifdef SOLARIS_THREADS
-#define USE_LOCK_FOR_KEY /* undef this to try a version without
- lock for the global key... */
-
-_X_EXPORT unsigned long
-_glthread_GetID(void)
-{
- OsAbort(); /* XXX not implemented yet */
- return (unsigned long) 0;
-}
-
-
-void
-_glthread_InitTSD(_glthread_TSD *tsd)
-{
- if ((errno = mutex_init(&tsd->keylock, 0, NULL)) != 0 ||
- (errno = thr_keycreate(&(tsd->key), free)) != 0) {
- perror(INIT_TSD_ERROR);
- exit(-1);
- }
- tsd->initMagic = INIT_MAGIC;
-}
-
-
-void *
-_glthread_GetTSD(_glthread_TSD *tsd)
-{
- void* ret;
- if (tsd->initMagic != INIT_MAGIC) {
- _glthread_InitTSD(tsd);
- }
-#ifdef USE_LOCK_FOR_KEY
- mutex_lock(&tsd->keylock);
- thr_getspecific(tsd->key, &ret);
- mutex_unlock(&tsd->keylock);
-#else
- if ((errno = thr_getspecific(tsd->key, &ret)) != 0) {
- perror(GET_TSD_ERROR);
- exit(-1);
- }
-#endif
- return ret;
-}
-
-
-void
-_glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
-{
- if (tsd->initMagic != INIT_MAGIC) {
- _glthread_InitTSD(tsd);
- }
- if ((errno = thr_setspecific(tsd->key, ptr)) != 0) {
- perror(SET_TSD_ERROR);
- exit(-1);
- }
-}
-
-#undef USE_LOCK_FOR_KEY
-#endif /* SOLARIS_THREADS */
-
-
-
/*
* Win32 Threads. The only available option for Windows 95/NT.
* Be sure that you compile using the Multithreaded runtime, otherwise