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

Function cpu_exit

freebsd/i386/i386/vm_machdep.c:287–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287void
288cpu_exit(struct thread *td)
289{
290
291 /*
292 * If this process has a custom LDT, release it. Reset pc->pcb_gs
293 * and %gs before we free it in case they refer to an LDT entry.
294 */
295 mtx_lock_spin(&dt_lock);
296 if (td->td_proc->p_md.md_ldt) {
297 td->td_pcb->pcb_gs = _udatasel;
298 load_gs(_udatasel);
299 user_ldt_free(td);
300 } else
301 mtx_unlock_spin(&dt_lock);
302}
303
304void
305cpu_thread_exit(struct thread *td)

Callers

nothing calls this directly

Calls 2

user_ldt_freeFunction · 0.70
load_gsFunction · 0.50

Tested by

no test coverage detected