summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2011-03-08 19:01:45 +0000
committerdchagin <dchagin@FreeBSD.org>2011-03-08 19:01:45 +0000
commit69b8756d3d58aa14dd376399c31b04fe4d1336aa (patch)
treed6e13e3ff30eec0b300ebcb3875ada50ab585a4a /sys/i386
parenta223afb5ea4cde968f6d0db88c9f5990de7f743d (diff)
downloadFreeBSD-src-69b8756d3d58aa14dd376399c31b04fe4d1336aa.zip
FreeBSD-src-69b8756d3d58aa14dd376399c31b04fe4d1336aa.tar.gz
Extend struct sysvec with new method sv_schedtail, which is used for an
explicit process at fork trampoline path instead of eventhadler(schedtail) invocation for each child process. Remove eventhandler(schedtail) code and change linux ABI to use newly added sysvec method. While here replace explicit comparing of module sysentvec structure with the newly created process sysentvec to detect the linux ABI. Discussed with: kib MFC after: 2 Week
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/elf_machdep.c1
-rw-r--r--sys/i386/ibcs2/ibcs2_sysvec.c1
-rw-r--r--sys/i386/linux/linux_sysvec.c6
3 files changed, 4 insertions, 4 deletions
diff --git a/sys/i386/i386/elf_machdep.c b/sys/i386/i386/elf_machdep.c
index df3f48f..a782445 100644
--- a/sys/i386/i386/elf_machdep.c
+++ b/sys/i386/i386/elf_machdep.c
@@ -78,6 +78,7 @@ struct sysentvec elf32_freebsd_sysvec = {
.sv_set_syscall_retval = cpu_set_syscall_retval,
.sv_fetch_syscall_args = cpu_fetch_syscall_args,
.sv_syscallnames = syscallnames,
+ .sv_schedtail = NULL,
};
static Elf32_Brandinfo freebsd_brand_info = {
diff --git a/sys/i386/ibcs2/ibcs2_sysvec.c b/sys/i386/ibcs2/ibcs2_sysvec.c
index d69a244..5b6f680 100644
--- a/sys/i386/ibcs2/ibcs2_sysvec.c
+++ b/sys/i386/ibcs2/ibcs2_sysvec.c
@@ -90,6 +90,7 @@ struct sysentvec ibcs2_svr3_sysvec = {
.sv_set_syscall_retval = cpu_set_syscall_retval,
.sv_fetch_syscall_args = cpu_fetch_syscall_args,
.sv_syscallnames = NULL,
+ .sv_schedtail = NULL,
};
static int
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index c0d9c23..62901d4 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -112,7 +112,6 @@ static int linux_szplatform;
const char *linux_platform;
static eventhandler_tag linux_exit_tag;
-static eventhandler_tag linux_schedtail_tag;
static eventhandler_tag linux_exec_tag;
/*
@@ -998,6 +997,7 @@ struct sysentvec linux_sysvec = {
.sv_set_syscall_retval = cpu_set_syscall_retval,
.sv_fetch_syscall_args = linux_fetch_syscall_args,
.sv_syscallnames = NULL,
+ .sv_schedtail = linux_schedtail,
};
struct sysentvec elf_linux_sysvec = {
@@ -1032,6 +1032,7 @@ struct sysentvec elf_linux_sysvec = {
.sv_set_syscall_retval = cpu_set_syscall_retval,
.sv_fetch_syscall_args = linux_fetch_syscall_args,
.sv_syscallnames = NULL,
+ .sv_schedtail = linux_schedtail,
};
static char GNU_ABI_VENDOR[] = "GNU";
@@ -1125,8 +1126,6 @@ linux_elf_modevent(module_t mod, int type, void *data)
mtx_init(&futex_mtx, "ftllk", NULL, MTX_DEF);
linux_exit_tag = EVENTHANDLER_REGISTER(process_exit, linux_proc_exit,
NULL, 1000);
- linux_schedtail_tag = EVENTHANDLER_REGISTER(schedtail, linux_schedtail,
- NULL, 1000);
linux_exec_tag = EVENTHANDLER_REGISTER(process_exec, linux_proc_exec,
NULL, 1000);
linux_get_machine(&linux_platform);
@@ -1159,7 +1158,6 @@ linux_elf_modevent(module_t mod, int type, void *data)
sx_destroy(&emul_shared_lock);
mtx_destroy(&futex_mtx);
EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag);
- EVENTHANDLER_DEREGISTER(schedtail, linux_schedtail_tag);
EVENTHANDLER_DEREGISTER(process_exec, linux_exec_tag);
linux_osd_jail_deregister();
if (bootverbose)
OpenPOWER on IntegriCloud