diff options
Diffstat (limited to 'router/router.h')
-rw-r--r-- | router/router.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/router/router.h b/router/router.h index 57a32d9a..7cd776f4 100644 --- a/router/router.h +++ b/router/router.h @@ -8,6 +8,7 @@ #include "AL/alc.h" #include "AL/al.h" #include "atomic.h" +#include "rwlock.h" typedef struct DriverIface { @@ -116,4 +117,21 @@ extern int DriverListSize; extern ATOMIC(DriverIface*) CurrentCtxDriver; +typedef struct PtrIntMap { + ALvoid **keys; + /* Shares memory with keys. */ + ALint *values; + + ALsizei size; + ALsizei capacity; + RWLock lock; +} PtrIntMap; +#define PTRINTMAP_STATIC_INITIALIZE { NULL, NULL, 0, 0, RWLOCK_STATIC_INITIALIZE } + +void InitPtrIntMap(PtrIntMap *map); +void ResetPtrIntMap(PtrIntMap *map); +ALenum InsertPtrIntMapEntry(PtrIntMap *map, ALvoid *key, ALint value); +ALint RemovePtrIntMapKey(PtrIntMap *map, ALvoid *key); +ALint LookupPtrIntMapKey(PtrIntMap *map, ALvoid *key); + #endif /* ROUTER_ROUTER_H */ |