13 typedef struct UIntMap
{
15 /* Shares memory with keys. */
23 #define UINTMAP_STATIC_INITIALIZE_N(_n) { NULL, NULL, 0, 0, (_n), RWLOCK_STATIC_INITIALIZE }
24 #define UINTMAP_STATIC_INITIALIZE UINTMAP_STATIC_INITIALIZE_N(INT_MAX)
26 void InitUIntMap(UIntMap
*map
, ALsizei limit
);
27 void ResetUIntMap(UIntMap
*map
);
28 ALenum
InsertUIntMapEntry(UIntMap
*map
, ALuint key
, ALvoid
*value
);
29 ALenum
InsertUIntMapEntryNoLock(UIntMap
*map
, ALuint key
, ALvoid
*value
);
30 ALvoid
*RemoveUIntMapKey(UIntMap
*map
, ALuint key
);
31 ALvoid
*RemoveUIntMapKeyNoLock(UIntMap
*map
, ALuint key
);
32 ALvoid
*LookupUIntMapKey(UIntMap
*map
, ALuint key
);
33 ALvoid
*LookupUIntMapKeyNoLock(UIntMap
*map
, ALuint key
);
35 inline void LockUIntMapRead(UIntMap
*map
)
36 { ReadLock(&map
->lock
); }
37 inline void UnlockUIntMapRead(UIntMap
*map
)
38 { ReadUnlock(&map
->lock
); }
39 inline void LockUIntMapWrite(UIntMap
*map
)
40 { WriteLock(&map
->lock
); }
41 inline void UnlockUIntMapWrite(UIntMap
*map
)
42 { WriteUnlock(&map
->lock
); }
48 #endif /* AL_UINTMAP_H */