hash.h
来自「cache库 别人写的」· C头文件 代码 · 共 33 行
H
33 行
/********************************************************************
created: 2008/01/23
filename: hash.h
author: Lichuang
purpose:
*********************************************************************/
#ifndef __HASH_H__
#define __HASH_H__
#include "ccache.h"
typedef struct hashitem_t
{
union
{
int first;
int root;
};
int nodenum;
pthread_mutex_t mutex;
}hashitem_t;
unsigned int hash(const void* key, cache_t* cache);
int inithashitem(cache_t* cache);
#define HASH_ITEM(cache, hashindex) (hashitem_t*)((char*)&((cache)->data[0]) + hashindex * sizeof(struct hashitem_t))
#endif /* __HASH_H__ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?