Lines Matching refs:entry

28 void insert_##NAME##_list(TYPE **list, TYPE *entry) { \
30 entry->NAME##_next = *list; \
31 entry->NAME##_prev = (*list)->NAME##_prev; \
32 (*list)->NAME##_prev->NAME##_next = entry; \
33 (*list)->NAME##_prev = entry; \
35 *list = entry; \
36 entry->NAME##_prev = entry->NAME##_next = entry; \
42 void remove_##NAME##_list(TYPE **list, TYPE *entry) { \
43 if(entry->NAME##_prev == entry && entry->NAME##_next == entry) { \
44 /* only this entry in the list */ \
46 } else if(entry->NAME##_prev != NULL && entry->NAME##_next != NULL) { \
47 /* more than one entry in the list */ \
48 entry->NAME##_next->NAME##_prev = entry->NAME##_prev; \
49 entry->NAME##_prev->NAME##_next = entry->NAME##_next; \
50 if(*list == entry) \
51 *list = entry->NAME##_next; \
53 entry->NAME##_prev = entry->NAME##_next = NULL; \
58 void insert_##NAME##_hash_table(TYPE *container, struct file_buffer *entry) \
60 int hash = HASH_FUNCTION(entry->FIELD); \
62 entry->LINK##_next = container->hash_table[hash]; \
63 container->hash_table[hash] = entry; \
64 entry->LINK##_prev = NULL; \
65 if(entry->LINK##_next) \
66 entry->LINK##_next->LINK##_prev = entry; \
71 void remove_##NAME##_hash_table(TYPE *container, struct file_buffer *entry) \
73 if(entry->LINK##_prev) \
74 entry->LINK##_prev->LINK##_next = entry->LINK##_next; \
76 container->hash_table[HASH_FUNCTION(entry->FIELD)] = \
77 entry->LINK##_next; \
78 if(entry->LINK##_next) \
79 entry->LINK##_next->LINK##_prev = entry->LINK##_prev; \
81 entry->LINK##_prev = entry->LINK##_next = NULL; \
88 /* struct describing a cache entry passed between threads */