wangzhengquan
2021-02-05 14c345b38d57fd814f217eb8465963a08ca79f7e
src/shm/hashtable.h
@@ -7,13 +7,20 @@
#define MAPSIZE 1024
// 创建Queue数量的上限
#define QUEUE_COUNT_LIMIT 300
typedef struct hashtable_t
{
 struct tailq_header_t* array[MAPSIZE];
 int mutex;
 int queueCount;
 int currentKey; // 当前分配的key
 // int wlock;
 // int cond;
 // size_t readcnt;
} hashtable_t;
typedef void (*hashtable_foreach_cb)(int key, void *value);
@@ -29,6 +36,8 @@
int hashtable_lock(hashtable_t *hashtable);
int hashtable_unlock(hashtable_t *hashtable);
int hashtable_get_queue_count(hashtable_t *hashtable) ;
/** 
 * 遍历hash_table
 * @demo