MCPcopy Create free account
hub / github.com/F-Stack/f-stack / thread_alloc_stack

Function thread_alloc_stack

freebsd/kern/kern_thread.c:738–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

736}
737
738int
739thread_alloc_stack(struct thread *td, int pages)
740{
741
742 KASSERT(td->td_kstack == 0,
743 ("thread_alloc_stack called on a thread with kstack"));
744 if (!vm_thread_new(td, pages))
745 return (0);
746 cpu_thread_alloc(td);
747 return (1);
748}
749
750/*
751 * Deallocate a thread.

Callers 1

fork1Function · 0.85

Calls 2

vm_thread_newFunction · 0.85
cpu_thread_allocFunction · 0.50

Tested by

no test coverage detected