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

Function kern_thr_alloc

freebsd/kern/kern_thr.c:612–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

610}
611
612int
613kern_thr_alloc(struct proc *p, int pages, struct thread **ntd)
614{
615
616 /* Have race condition but it is cheap. */
617 if (p->p_numthreads >= max_threads_per_proc) {
618 ++max_threads_hits;
619 return (EPROCLIM);
620 }
621
622 *ntd = thread_alloc(pages);
623 if (*ntd == NULL)
624 return (ENOMEM);
625
626 return (0);
627}

Callers 1

thread_createFunction · 0.85

Calls 1

thread_allocFunction · 0.85

Tested by

no test coverage detected