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