Lines Matching refs:thrash_state
132 char *thrash_state, int tag) in gang_check() argument
147 assert(thrash_state[last_index] != NODE_TAGGED); in gang_check()
150 assert(thrash_state[last_index] == NODE_TAGGED); in gang_check()
157 static void do_thrash(struct radix_tree_root *tree, char *thrash_state, int tag) in do_thrash() argument
181 if (thrash_state[index] != NODE_ABSENT) in do_thrash()
185 assert(thrash_state[index] != NODE_PRESENT); in do_thrash()
186 thrash_state[index] = NODE_PRESENT; in do_thrash()
193 if (thrash_state[index] == NODE_ABSENT) in do_thrash()
197 assert(thrash_state[index] == NODE_TAGGED); in do_thrash()
200 assert(thrash_state[index] == NODE_PRESENT); in do_thrash()
203 assert(thrash_state[index] != NODE_ABSENT); in do_thrash()
204 thrash_state[index] = NODE_ABSENT; in do_thrash()
211 if (thrash_state[index] != NODE_PRESENT) { in do_thrash()
218 assert(thrash_state[index] != NODE_TAGGED); in do_thrash()
219 thrash_state[index] = NODE_TAGGED; in do_thrash()
226 if (thrash_state[index] != NODE_TAGGED) in do_thrash()
232 assert(thrash_state[index] != NODE_PRESENT); in do_thrash()
233 thrash_state[index] = NODE_PRESENT; in do_thrash()
241 switch (thrash_state[index]) { in do_thrash()
259 gang_check(tree, thrash_state, tag); in do_thrash()
275 char *thrash_state; in thrash_tags() local
277 thrash_state = malloc(THRASH_SIZE); in thrash_tags()
278 memset(thrash_state, 0, THRASH_SIZE); in thrash_tags()
280 do_thrash(&tree, thrash_state, 0); in thrash_tags()
284 free(thrash_state); in thrash_tags()