Lines Matching refs:element

51 next_element(hash_table *table, void *element)
54 return (void *)(*(unsigned long *)NEXT_ADDR(table, element));
111 hash_insert(struct hash_table *table, void *element)
115 ASSERT(table != NULL && element != NULL);
116 TRACE(("hash_insert: table 0x%x, element 0x%x\n", table, element));
118 hash = table->hash_func(element, NULL, table->table_size);
119 PUT_IN_NEXT(table, element, table->table[hash]);
120 table->table[hash] = (struct hash_element *)element;
133 void *element, *lastElement = NULL;
135 for (element = table->table[hash]; element != NULL;
136 lastElement = element, element = NEXT(table, element)) {
137 if (element == _element) {
140 PUT_IN_NEXT(table, lastElement, NEXT(table, element));
142 table->table[hash] = (struct hash_element *)NEXT(table, element);
157 void *element;
162 for (element = table->table[index]; index < table->table_size; index++) {
165 while (element != NULL) {
166 if (element == iterator->current) {
171 PUT_IN_NEXT(table, lastElement, NEXT(table, element));
174 element);
181 element = NEXT(table, element);
193 void *element = table->table[index];
194 if (element != NULL) {
195 // remove the first element we find
196 table->table[index] = (struct hash_element *)NEXT(table, element);
200 return element;
212 void *element;
214 for (element = table->table[hash]; element != NULL; element = NEXT(table, element)) {
215 if (element == searchedElement)
216 return element;
227 void *element;
229 for (element = table->table[hash]; element != NULL; element = NEXT(table, element)) {
230 if (table->compare_func(element, key) == 0)
231 return element;