add a debug function

This commit is contained in:
Bill Currie 2007-03-23 12:36:55 +00:00 committed by Jeff Teunissen
parent 4ccb6675a6
commit 818756ace5
2 changed files with 7 additions and 0 deletions

View file

@ -150,6 +150,7 @@ void Cache_Remove (cache_user_t *c);
void *Cache_Get (cache_user_t *c); void *Cache_Get (cache_user_t *c);
void *Cache_TryGet (cache_user_t *c); void *Cache_TryGet (cache_user_t *c);
void Cache_Release (cache_user_t *c); void Cache_Release (cache_user_t *c);
int Cache_ReadLock (cache_user_t *c);
/* Flags */ /* Flags */
#define QA_NONE 0 #define QA_NONE 0

View file

@ -1077,6 +1077,12 @@ Cache_Release (cache_user_t *c)
CACHE_WRITE_UNLOCK; CACHE_WRITE_UNLOCK;
} }
int
Cache_ReadLock (cache_user_t *c)
{
return (((cache_system_t *)c->data) - 1)->readlock;
}
// QA_alloc and friends ======================================================= // QA_alloc and friends =======================================================
size_t (*QA_alloc_callback) (size_t size); size_t (*QA_alloc_callback) (size_t size);