forked from Samsung/CAS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaps.h
109 lines (94 loc) · 4.47 KB
/
maps.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#ifndef __MAPS_H__
#define __MAPS_H__
struct nfsdb_entryMap_node {
struct rb_node node;
unsigned long key;
struct nfsdb_entry** entry_list;
unsigned long entry_count;
};
struct ulongMap_node {
struct rb_node node;
unsigned long key;
unsigned long* value_list;
unsigned long value_count;
};
struct stringRefMap_node {
struct rb_node node;
const char* key;
unsigned long value;
};
struct nfsdb_fileMap_node {
struct rb_node node;
unsigned long key;
struct nfsdb_entry** rd_entry_list;
unsigned long* rd_entry_index;
unsigned long rd_entry_count;
struct nfsdb_entry** wr_entry_list;
unsigned long* wr_entry_index;
unsigned long wr_entry_count;
struct nfsdb_entry** rw_entry_list;
unsigned long* rw_entry_index;
unsigned long rw_entry_count;
};
struct nfsdb_entryMap_node* nfsdb_entryMap_search(const struct rb_root* nfsdb_entryMap, unsigned long key);
int nfsdb_entryMap_insert(struct rb_root* nfsdb_entryMap, unsigned long key, struct nfsdb_entry** entry_list,
unsigned long count);
void nfsdb_entryMap_destroy(struct rb_root* nfsdb_entryMap);
size_t nfsdb_entryMap_count(const struct rb_root* nfsdb_entryMap);
size_t nfsdb_entryMap_entry_count(const struct rb_root* nfsdb_entryMap);
struct ulongMap_node* ulongMap_search(const struct rb_root* ulongMap, unsigned long key);
int ulongMap_insert(struct rb_root* ulongMap, unsigned long key, unsigned long* value, unsigned long count);
void ulongMap_destroy(struct rb_root* ulongMap);
size_t ulongMap_count(const struct rb_root* ulongMap);
size_t ulongMap_entry_count(const struct rb_root* ulongMap);
struct stringRefMap_node* stringRefMap_search(const struct rb_root* stringMap, const char* key);
int stringRefMap_insert(struct rb_root* stringMap, const char* key, unsigned long value);
void stringRefMap_destroy(struct rb_root* stringMap);
size_t stringRefMap_count(const struct rb_root* stringMap);
struct nfsdb_fileMap_node* fileMap_search(const struct rb_root* fileMap, unsigned long key);
struct nfsdb_fileMap_node* fileMap_insert_key(struct rb_root* fileMap, unsigned long key);
void fileMap_destroy(struct rb_root* fileMap);
size_t fileMap_count(const struct rb_root* fileMap);
size_t fileMap_rd_entry_count(const struct rb_root* fileMap);
size_t fileMap_wr_entry_count(const struct rb_root* fileMap);
size_t fileMap_rw_entry_count(const struct rb_root* fileMap);
struct ulong_entryMap_node {
struct rb_node node;
unsigned long key;
void* entry;
};
typedef struct ulong_entryMap_node ftdb_ulong_type_entryMap;
typedef struct ulong_entryMap_node ftdb_ulong_func_entryMap;
typedef struct ulong_entryMap_node ftdb_ulong_funcdecl_entryMap;
typedef struct ulong_entryMap_node ftdb_ulong_global_entryMap;
struct stringRef_entryMap_node {
struct rb_node node;
const char* key;
void* entry;
};
typedef struct stringRef_entryMap_node ftdb_stringRef_type_entryMap;
typedef struct stringRef_entryMap_node ftdb_stringRef_func_entryMap;
typedef struct stringRef_entryMap_node ftdb_stringRef_funcdecl_entryMap;
typedef struct stringRef_entryMap_node ftdb_stringRef_global_entryMap;
struct stringRef_entryListMap_node {
struct rb_node node;
const char* key;
void** entry_list;
unsigned long entry_count;
};
typedef struct stringRef_entryListMap_node ftdb_stringRef_func_entryListMap;
typedef struct stringRef_entryListMap_node ftdb_stringRef_global_entryListMap;
struct ulong_entryMap_node* ulong_entryMap_search(const struct rb_root* ulong_entryMap, unsigned long key);
int ulong_entryMap_insert(struct rb_root* ulong_entryMap, unsigned long key, void* entry);
void ulong_entryMap_destroy(struct rb_root* ulong_entryMap);
size_t ulong_entryMap_count(const struct rb_root* ulong_entryMap);
struct stringRef_entryMap_node* stringRef_entryMap_search(const struct rb_root* stringRef_entryMap, const char* key);
int stringRef_entryMap_insert(struct rb_root* stringRef_entryMap, const char* key, void* entry);
void stringRef_entryMap_destroy(struct rb_root* stringRef_entryMap);
size_t stringRef_entryMap_count(const struct rb_root* stringRef_entryMap);
struct stringRef_entryListMap_node* stringRef_entryListMap_search(const struct rb_root* stringRef_entryListMap, const char* key);
int stringRef_entryListMap_insert(struct rb_root* stringRef_entryListMap, const char* key, void** entry_list, unsigned long entry_count);
void stringRef_entryListMap_destroy(struct rb_root* stringRef_entryListMap);
size_t stringRef_entryListMap_count(const struct rb_root* stringRef_entryListMap);
size_t stringRef_entryListMap_entry_count(const struct rb_root* stringRef_entryListMap);
#endif /* __MAPS_H__ */