-/* $Id: glthread.h,v 1.11 2002/03/07 21:50:41 brianp Exp $ */
+/* $Id: glthread.h,v 1.12 2002/12/12 13:03:15 keithw Exp $ */
/*
* Mesa 3-D graphics library
#define _glthread_INIT_MUTEX(name) \
pthread_mutex_init(&(name), NULL)
+#define _glthread_DESTROY_MUTEX(name) \
+ pthread_mutex_destroy(&(name))
+
#define _glthread_LOCK_MUTEX(name) \
(void) pthread_mutex_lock(&(name))
/* XXX need to really implement mutex-related macros */
#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0
#define _glthread_INIT_MUTEX(name) (void) name
+#define _glthread_DESTROY_MUTEX(name) (void) name
#define _glthread_LOCK_MUTEX(name) (void) name
#define _glthread_UNLOCK_MUTEX(name) (void) name
/* XXX need to really implement mutex-related macros */
#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0
#define _glthread_INIT_MUTEX(name) (void) name
+#define _glthread_DESTROY_MUTEX(name) (void) name
#define _glthread_LOCK_MUTEX(name) (void) name
#define _glthread_UNLOCK_MUTEX(name) (void) name
#define _glthread_INIT_MUTEX(name) \
xmutex_init(&(name))
+#define _glthread_DESTROY_MUTEX(name) \
+ xmutex_clear(&(name))
+
#define _glthread_LOCK_MUTEX(name) \
(void) xmutex_lock(&(name))
#define _glthread_INIT_MUTEX(name) (void) name
+#define _glthread_DESTROY_MUTEX(name) (void) name
+
#define _glthread_LOCK_MUTEX(name) (void) name
#define _glthread_UNLOCK_MUTEX(name) (void) name
-/* $Id: context.c,v 1.189 2002/11/19 15:25:00 brianp Exp $ */
+/* $Id: context.c,v 1.190 2002/12/12 13:03:15 keithw Exp $ */
/*
* Mesa 3-D graphics library
_mesa_DeleteHashTable(ss->VertexPrograms);
#endif
+ _glthread_DESTROY_MUTEX(ss->Mutex);
+
FREE(ss);
}
-/* $Id: texobj.c,v 1.62 2002/10/24 23:57:21 brianp Exp $ */
+/* $Id: texobj.c,v 1.63 2002/12/12 13:03:15 keithw Exp $ */
/*
* Mesa 3-D graphics library
}
}
+ /* destroy the mutex -- it may have allocated memory (eg on bsd) */
+ _glthread_DESTROY_MUTEX(t->Mutex);
+
/* free this object */
FREE( t );
}