Lines Matching refs:spare_stack
184 struct stack *spare_stack; in _thr_stack_alloc() local
213 if ((spare_stack = LIST_FIRST(&dstackq)) != NULL) { in _thr_stack_alloc()
215 LIST_REMOVE(spare_stack, qe); in _thr_stack_alloc()
216 attr->stackaddr_attr = spare_stack->stackaddr; in _thr_stack_alloc()
225 LIST_FOREACH(spare_stack, &mstackq, qe) { in _thr_stack_alloc()
226 if (spare_stack->stacksize == stacksize && in _thr_stack_alloc()
227 spare_stack->guardsize == guardsize) { in _thr_stack_alloc()
228 LIST_REMOVE(spare_stack, qe); in _thr_stack_alloc()
229 attr->stackaddr_attr = spare_stack->stackaddr; in _thr_stack_alloc()
287 struct stack *spare_stack; in _thr_stack_free() local
291 spare_stack = (struct stack *) in _thr_stack_free()
294 spare_stack->stacksize = round_up(attr->stacksize_attr); in _thr_stack_free()
295 spare_stack->guardsize = round_up(attr->guardsize_attr); in _thr_stack_free()
296 spare_stack->stackaddr = attr->stackaddr_attr; in _thr_stack_free()
298 if (spare_stack->stacksize == THR_STACK_DEFAULT && in _thr_stack_free()
299 spare_stack->guardsize == _thr_guard_default) { in _thr_stack_free()
301 LIST_INSERT_HEAD(&dstackq, spare_stack, qe); in _thr_stack_free()
304 LIST_INSERT_HEAD(&mstackq, spare_stack, qe); in _thr_stack_free()