_mesa_HashLockMutex(ctx->Shared->BufferObjects);
ctx->BufferObjectsLocked = true;
- mtx_lock(&ctx->Shared->TexMutex);
+ simple_mtx_lock(&ctx->Shared->TexMutex);
ctx->TexturesLocked = true;
while (pos < used) {
}
ctx->TexturesLocked = false;
- mtx_unlock(&ctx->Shared->TexMutex);
+ simple_mtx_unlock(&ctx->Shared->TexMutex);
ctx->BufferObjectsLocked = false;
_mesa_HashUnlockMutex(ctx->Shared->BufferObjects);
* \todo Improve the granularity of locking.
*/
/*@{*/
- mtx_t TexMutex; /**< texobj thread safety */
+ simple_mtx_t TexMutex; /**< texobj thread safety */
GLuint TextureStateStamp; /**< state notification for shared tex */
/*@}*/
assert(shared->DefaultTex[TEXTURE_1D_INDEX]->RefCount == 1);
/* Mutex and timestamp for texobj state validation */
- mtx_init(&shared->TexMutex, mtx_recursive);
+ simple_mtx_init(&shared->TexMutex, mtx_plain);
shared->TextureStateStamp = 0;
shared->FrameBuffers = _mesa_NewHashTable();
}
simple_mtx_destroy(&shared->Mutex);
- mtx_destroy(&shared->TexMutex);
+ simple_mtx_destroy(&shared->TexMutex);
free(shared);
}
_mesa_lock_context_textures( struct gl_context *ctx )
{
if (!ctx->TexturesLocked)
- mtx_lock(&ctx->Shared->TexMutex);
+ simple_mtx_lock(&ctx->Shared->TexMutex);
if (ctx->Shared->TextureStateStamp != ctx->TextureStateTimestamp) {
ctx->NewState |= _NEW_TEXTURE_OBJECT;
{
assert(ctx->Shared->TextureStateStamp == ctx->TextureStateTimestamp);
if (!ctx->TexturesLocked)
- mtx_unlock(&ctx->Shared->TexMutex);
+ simple_mtx_unlock(&ctx->Shared->TexMutex);
}
_mesa_lock_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
{
if (!ctx->TexturesLocked)
- mtx_lock(&ctx->Shared->TexMutex);
+ simple_mtx_lock(&ctx->Shared->TexMutex);
ctx->Shared->TextureStateStamp++;
(void) texObj;
}
{
(void) texObj;
if (!ctx->TexturesLocked)
- mtx_unlock(&ctx->Shared->TexMutex);
+ simple_mtx_unlock(&ctx->Shared->TexMutex);
}