Store devices as a hashtable

This commit is contained in:
2025-10-03 23:47:58 +02:00
parent 18d646ff8b
commit 04a4b1395c
11 changed files with 53 additions and 38 deletions

View File

@ -29,7 +29,7 @@ enum {
#define HSHTB_ALLOC(tb, keyfield, k, out) \
do { \
size_t __len = sizeof((tb)) / sizeof((tb)[0]); \
uint32_t __h = hshtb_fnv32((k), strlen((k))); \
uint32_t __h = hshtb_fnv32((k), hal_strlen((k))); \
size_t __idx = __h % __len; \
size_t __start = __idx; \
typeof(&(tb)[0]) __tomb = NULL; \