aboutsummaryrefslogtreecommitdiff
path: root/lib/libsys
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libsys')
-rw-r--r--lib/libsys/Makefile.sys1
-rw-r--r--lib/libsys/_libsys.h4
-rw-r--r--lib/libsys/amd64/amd64_get_fsbase.c7
-rw-r--r--lib/libsys/amd64/amd64_get_gsbase.c7
-rw-r--r--lib/libsys/amd64/amd64_set_fsbase.c7
-rw-r--r--lib/libsys/amd64/amd64_set_gsbase.c7
-rw-r--r--lib/libsys/syscalls.map2
7 files changed, 7 insertions, 28 deletions
diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys
index 7871731dcdcd..bd65b58083c2 100644
--- a/lib/libsys/Makefile.sys
+++ b/lib/libsys/Makefile.sys
@@ -52,7 +52,6 @@ STATICOBJS+= interposing_table.o
PSEUDO= \
__realpathat \
clock_gettime \
- exit \
getlogin \
gettimeofday \
sched_getcpu
diff --git a/lib/libsys/_libsys.h b/lib/libsys/_libsys.h
index 7a1685cca2d1..2f89e8fea92b 100644
--- a/lib/libsys/_libsys.h
+++ b/lib/libsys/_libsys.h
@@ -65,7 +65,7 @@ struct uuid;
union semun;
__BEGIN_DECLS
-typedef void (__sys_exit_t)(int);
+typedef void (__sys__exit_t)(int);
typedef int (__sys_fork_t)(void);
typedef ssize_t (__sys_read_t)(int, void *, size_t);
typedef ssize_t (__sys_write_t)(int, const void *, size_t);
@@ -469,7 +469,7 @@ typedef int (__sys_exterrctl_t)(u_int, u_int, void *);
typedef int (__sys_inotify_add_watch_at_t)(int, int, const char *, uint32_t);
typedef int (__sys_inotify_rm_watch_t)(int, int);
-void __sys_exit(int rval);
+_Noreturn void __sys__exit(int rval);
int __sys_fork(void);
ssize_t __sys_read(int fd, void * buf, size_t nbyte);
ssize_t __sys_write(int fd, const void * buf, size_t nbyte);
diff --git a/lib/libsys/amd64/amd64_get_fsbase.c b/lib/libsys/amd64/amd64_get_fsbase.c
index 00f16a5e404f..b5e87f8a3ce5 100644
--- a/lib/libsys/amd64/amd64_get_fsbase.c
+++ b/lib/libsys/amd64/amd64_get_fsbase.c
@@ -30,7 +30,6 @@
* SUCH DAMAGE.
*/
-#define _WANT_P_OSREL
#include <sys/param.h>
#include <machine/cpufunc.h>
#include <machine/specialreg.h>
@@ -41,7 +40,6 @@
static int
amd64_get_fsbase_cpu(void **addr)
{
-
*addr = (void *)rdfsbase();
return (0);
}
@@ -49,15 +47,12 @@ amd64_get_fsbase_cpu(void **addr)
static int
amd64_get_fsbase_syscall(void **addr)
{
-
return (sysarch(AMD64_GET_FSBASE, addr));
}
DEFINE_UIFUNC(, int, amd64_get_fsbase, (void **))
{
-
- if (__getosreldate() >= P_OSREL_WRFSBASE &&
- (cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) != 0)
+ if ((cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) != 0)
return (amd64_get_fsbase_cpu);
return (amd64_get_fsbase_syscall);
}
diff --git a/lib/libsys/amd64/amd64_get_gsbase.c b/lib/libsys/amd64/amd64_get_gsbase.c
index ef135b1eed7f..51be412ddd7a 100644
--- a/lib/libsys/amd64/amd64_get_gsbase.c
+++ b/lib/libsys/amd64/amd64_get_gsbase.c
@@ -30,7 +30,6 @@
* SUCH DAMAGE.
*/
-#define _WANT_P_OSREL
#include <sys/param.h>
#include <machine/cpufunc.h>
#include <machine/specialreg.h>
@@ -41,7 +40,6 @@
static int
amd64_get_gsbase_cpu(void **addr)
{
-
*addr = (void *)rdgsbase();
return (0);
}
@@ -49,15 +47,12 @@ amd64_get_gsbase_cpu(void **addr)
static int
amd64_get_gsbase_syscall(void **addr)
{
-
return (sysarch(AMD64_GET_GSBASE, addr));
}
DEFINE_UIFUNC(, int, amd64_get_gsbase, (void **))
{
-
- if (__getosreldate() >= P_OSREL_WRFSBASE &&
- (cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) != 0)
+ if ((cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) != 0)
return (amd64_get_gsbase_cpu);
return (amd64_get_gsbase_syscall);
}
diff --git a/lib/libsys/amd64/amd64_set_fsbase.c b/lib/libsys/amd64/amd64_set_fsbase.c
index f1690fde6e17..5265bd712f17 100644
--- a/lib/libsys/amd64/amd64_set_fsbase.c
+++ b/lib/libsys/amd64/amd64_set_fsbase.c
@@ -30,7 +30,6 @@
* SUCH DAMAGE.
*/
-#define _WANT_P_OSREL
#include <sys/param.h>
#include <machine/cpufunc.h>
#include <machine/specialreg.h>
@@ -41,7 +40,6 @@
static int
amd64_set_fsbase_cpu(void *addr)
{
-
wrfsbase((uintptr_t)addr);
return (0);
}
@@ -49,15 +47,12 @@ amd64_set_fsbase_cpu(void *addr)
static int
amd64_set_fsbase_syscall(void *addr)
{
-
return (sysarch(AMD64_SET_FSBASE, &addr));
}
DEFINE_UIFUNC(, int, amd64_set_fsbase, (void *))
{
-
- if (__getosreldate() >= P_OSREL_WRFSBASE &&
- (cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) != 0)
+ if ((cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) != 0)
return (amd64_set_fsbase_cpu);
return (amd64_set_fsbase_syscall);
}
diff --git a/lib/libsys/amd64/amd64_set_gsbase.c b/lib/libsys/amd64/amd64_set_gsbase.c
index 756bbae18844..94f5736ed1ab 100644
--- a/lib/libsys/amd64/amd64_set_gsbase.c
+++ b/lib/libsys/amd64/amd64_set_gsbase.c
@@ -30,7 +30,6 @@
* SUCH DAMAGE.
*/
-#define _WANT_P_OSREL
#include <sys/param.h>
#include <machine/cpufunc.h>
#include <machine/specialreg.h>
@@ -41,7 +40,6 @@
static int
amd64_set_gsbase_cpu(void *addr)
{
-
wrgsbase((uintptr_t)addr);
return (0);
}
@@ -49,15 +47,12 @@ amd64_set_gsbase_cpu(void *addr)
static int
amd64_set_gsbase_syscall(void *addr)
{
-
return (sysarch(AMD64_SET_GSBASE, &addr));
}
DEFINE_UIFUNC(, int, amd64_set_gsbase, (void *))
{
-
- if (__getosreldate() >= P_OSREL_WRFSBASE &&
- (cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) != 0)
+ if ((cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) != 0)
return (amd64_set_gsbase_cpu);
return (amd64_set_gsbase_syscall);
}
diff --git a/lib/libsys/syscalls.map b/lib/libsys/syscalls.map
index 69fce2ea7c63..dbb011343c8f 100644
--- a/lib/libsys/syscalls.map
+++ b/lib/libsys/syscalls.map
@@ -7,7 +7,7 @@
FBSDprivate_1.0 {
_syscall;
__sys_syscall;
- __sys_exit;
+ __sys__exit;
_fork;
__sys_fork;
_read;