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

Function cpu_thread_alloc

freebsd/amd64/amd64/vm_machdep.c:347–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347void
348cpu_thread_alloc(struct thread *td)
349{
350 struct pcb *pcb;
351 struct xstate_hdr *xhdr;
352
353 set_top_of_stack_td(td);
354 td->td_pcb = pcb = get_pcb_td(td);
355 td->td_frame = (struct trapframe *)td->td_md.md_stack_base - 1;
356 pcb->pcb_save = get_pcb_user_save_pcb(pcb);
357 if (use_xsave) {
358 xhdr = (struct xstate_hdr *)(pcb->pcb_save + 1);
359 bzero(xhdr, sizeof(*xhdr));
360 xhdr->xstate_bv = xsave_mask;
361 }
362}
363
364void
365cpu_thread_free(struct thread *td)

Callers

nothing calls this directly

Calls 4

set_top_of_stack_tdFunction · 0.85
bzeroFunction · 0.85
get_pcb_tdFunction · 0.70
get_pcb_user_save_pcbFunction · 0.70

Tested by

no test coverage detected