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

Function amd64_set_ldt_data

freebsd/amd64/amd64/sys_machdep.c:795–813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

793}
794
795int
796amd64_set_ldt_data(struct thread *td, int start, int num,
797 struct user_segment_descriptor *descs)
798{
799 struct mdproc *mdp;
800 struct proc_ldt *pldt;
801 volatile uint64_t *dst, *src;
802 int i;
803
804 mtx_assert(&dt_lock, MA_OWNED);
805
806 mdp = &td->td_proc->p_md;
807 pldt = mdp->md_ldt;
808 dst = (volatile uint64_t *)(pldt->ldt_base);
809 src = (volatile uint64_t *)descs;
810 for (i = 0; i < num; i++)
811 dst[start + i] = src[i];
812 return (0);
813}

Callers 2

amd64_set_ldtFunction · 0.85
cpu_forkFunction · 0.85

Calls 1

mtx_assertFunction · 0.85

Tested by

no test coverage detected