Mesa (gallium-0.2): g3dvl: Use Gallium thread wrappers.

Younes Manton ymanton at kemper.freedesktop.org
Sat Jan 10 19:12:21 UTC 2009


Module: Mesa
Branch: gallium-0.2
Commit: 734b3cb182b4b7d1075faf60c1a23ab0a55af356
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=734b3cb182b4b7d1075faf60c1a23ab0a55af356

Author: Younes Manton <younes.m at gmail.com>
Date:   Sat Dec 20 17:37:24 2008 -0500

g3dvl: Use Gallium thread wrappers.

---

 src/gallium/winsys/g3dvl/nouveau/nouveau_lock.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_lock.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_lock.c
index 375634b..f292586 100644
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_lock.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_lock.c
@@ -25,12 +25,12 @@
  * 
  **************************************************************************/
 
-#include <pthread.h>
+#include <pipe/p_thread.h>
 #include <driclient.h>
 #include "nouveau_context.h"
 #include "nouveau_screen.h"
 
-static pthread_mutex_t lockMutex = PTHREAD_MUTEX_INITIALIZER;
+pipe_static_mutex(lockMutex);
 
 static void
 nouveau_contended_lock(struct nouveau_context *nv, unsigned int flags)
@@ -62,7 +62,7 @@ LOCK_HARDWARE(struct nouveau_context *nv)
 	struct nouveau_device_priv	*nvdev = nouveau_device(dev);
 	char				__ret=0;
 
-	pthread_mutex_lock(&lockMutex);
+	pipe_mutex_lock(lockMutex);
 	assert(!nv->locked);
 	
 	DRM_CAS(nvdev->lock, nvdev->ctx,
@@ -88,5 +88,5 @@ UNLOCK_HARDWARE(struct nouveau_context *nv)
 
 	DRM_UNLOCK(nvdev->fd, nvdev->lock, nvdev->ctx);
 
-	pthread_mutex_unlock(&lockMutex);
+	pipe_mutex_unlock(lockMutex);
 } 




More information about the mesa-commit mailing list