summaryrefslogtreecommitdiff
path: root/src/mesa/main/dlist.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-03-21 17:42:27 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-03-21 17:42:27 +0000
commit832179c50e2cf5de9735241e4767aea4d6fc33bf (patch)
tree7f265a594dcaa0bb05258067852d9615330c2fbc /src/mesa/main/dlist.c
parentfd2e6dbbc8f5d2283b2cf282687a06d68b056e59 (diff)
added more locking
Diffstat (limited to 'src/mesa/main/dlist.c')
-rw-r--r--src/mesa/main/dlist.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 995e413e9c..13976d8b1f 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -1,4 +1,4 @@
-/* $Id: dlist.c,v 1.35 2000/03/19 01:10:11 brianp Exp $ */
+/* $Id: dlist.c,v 1.36 2000/03/21 17:42:27 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -3957,6 +3957,11 @@ _mesa_GenLists(GLsizei range )
return 0;
}
+ /*
+ * Make this an atomic operation
+ */
+ _glthread_LOCK_MUTEX(ctx->Shared->Mutex);
+
base = _mesa_HashFindFreeKeyBlock(ctx->Shared->DisplayList, range);
if (base) {
/* reserve the list IDs by with empty/dummy lists */
@@ -3965,6 +3970,9 @@ _mesa_GenLists(GLsizei range )
_mesa_HashInsert(ctx->Shared->DisplayList, base+i, make_empty_list());
}
}
+
+ _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
+
return base;
}