Lines Matching refs:spare_stack
183 struct stack *spare_stack; in _thr_stack_alloc() local
212 if ((spare_stack = LIST_FIRST(&dstackq)) != NULL) { in _thr_stack_alloc()
214 LIST_REMOVE(spare_stack, qe); in _thr_stack_alloc()
215 attr->stackaddr_attr = spare_stack->stackaddr; in _thr_stack_alloc()
224 LIST_FOREACH(spare_stack, &mstackq, qe) { in _thr_stack_alloc()
225 if (spare_stack->stacksize == stacksize && in _thr_stack_alloc()
226 spare_stack->guardsize == guardsize) { in _thr_stack_alloc()
227 LIST_REMOVE(spare_stack, qe); in _thr_stack_alloc()
228 attr->stackaddr_attr = spare_stack->stackaddr; in _thr_stack_alloc()
286 struct stack *spare_stack; in _thr_stack_free() local
290 spare_stack = (struct stack *) in _thr_stack_free()
293 spare_stack->stacksize = round_up(attr->stacksize_attr); in _thr_stack_free()
294 spare_stack->guardsize = round_up(attr->guardsize_attr); in _thr_stack_free()
295 spare_stack->stackaddr = attr->stackaddr_attr; in _thr_stack_free()
297 if (spare_stack->stacksize == THR_STACK_DEFAULT && in _thr_stack_free()
298 spare_stack->guardsize == _thr_guard_default) { in _thr_stack_free()
300 LIST_INSERT_HEAD(&dstackq, spare_stack, qe); in _thr_stack_free()
303 LIST_INSERT_HEAD(&mstackq, spare_stack, qe); in _thr_stack_free()