Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libc/amd64/sys/amd64_set_fsbase.c
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
amd64_set_fsbase_syscall(void *addr) | amd64_set_fsbase_syscall(void *addr) | ||||
{ | { | ||||
return (sysarch(AMD64_SET_FSBASE, &addr)); | return (sysarch(AMD64_SET_FSBASE, &addr)); | ||||
} | } | ||||
DEFINE_UIFUNC(, int, amd64_set_fsbase, (void *), static) | DEFINE_UIFUNC(, int, amd64_set_fsbase, (void *)) | ||||
{ | { | ||||
if (__getosreldate() >= P_OSREL_WRFSBASE && | if (__getosreldate() >= P_OSREL_WRFSBASE && | ||||
(cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) != 0) | (cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) != 0) | ||||
return (amd64_set_fsbase_cpu); | return (amd64_set_fsbase_cpu); | ||||
return (amd64_set_fsbase_syscall); | return (amd64_set_fsbase_syscall); | ||||
} | } |