diff options
author | Brian Paul <[email protected]> | 2000-01-31 23:11:39 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-01-31 23:11:39 +0000 |
commit | 9560f05deffaf0321bba1bd0fcc8eeef4199e6e0 (patch) | |
tree | 4ba744a4504bfac639f03eaee1b7adb469d86281 /src/mesa/main/texobj.c | |
parent | bc794059d81e24eaac9f603f71b659d9c2d3716e (diff) |
added mutexes for thread safety
Diffstat (limited to 'src/mesa/main/texobj.c')
-rw-r--r-- | src/mesa/main/texobj.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 471ed75b143..b24470e8933 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -1,4 +1,4 @@ -/* $Id: texobj.c,v 1.12 2000/01/24 20:53:32 brianp Exp $ */ +/* $Id: texobj.c,v 1.13 2000/01/31 23:11:39 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -84,8 +84,10 @@ gl_alloc_texture_object( struct gl_shared_state *shared, GLuint name, /* insert into linked list */ if (shared) { + _glthread_LOCK_MUTEX(shared->Mutex); obj->Next = shared->TexObjectList; shared->TexObjectList = obj; + _glthread_UNLOCK_MUTEX(shared->Mutex); } if (name > 0) { @@ -118,6 +120,7 @@ void gl_free_texture_object( struct gl_shared_state *shared, /* unlink t from the linked list */ if (shared) { + _glthread_LOCK_MUTEX(shared->Mutex); tprev = NULL; tcurr = shared->TexObjectList; while (tcurr) { @@ -133,6 +136,7 @@ void gl_free_texture_object( struct gl_shared_state *shared, tprev = tcurr; tcurr = tcurr->Next; } + _glthread_UNLOCK_MUTEX(shared->Mutex); } if (t->Name) { |