More race conditions (bug #131)

This commit is contained in:
Bart van Strien
2010-12-31 11:37:50 +01:00
parent cfeb01db42
commit ece02577a5
2 changed files with 7 additions and 2 deletions
+1
View File
@@ -270,6 +270,7 @@ namespace sdl
SDL_CondWait(cond, mutex);
v = comm->getValue(name);
}
v->retain();
unlock();
return v;
}
+6 -2
View File
@@ -109,7 +109,9 @@ namespace sdl
lua_pushnil(L);
break;
}
t->lock();
v->release();
t->unlock();
return 1;
}
@@ -123,7 +125,6 @@ namespace sdl
lua_pushnil(L);
return 1;
}
v->retain();
t->clear(name);
switch(v->type)
{
@@ -151,7 +152,9 @@ namespace sdl
lua_pushnil(L);
break;
}
t->lock();
v->release();
t->unlock();
return 1;
}
@@ -165,7 +168,6 @@ namespace sdl
lua_pushnil(L);
return 1;
}
v->retain();
switch(v->type)
{
case BOOLEAN:
@@ -192,7 +194,9 @@ namespace sdl
lua_pushnil(L);
break;
}
t->lock();
v->release();
t->unlock();
return 1;
}