summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux
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/compat/linux
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/compat/linux')
-rw-r--r--sys/compat/linux/linux_emul.c7
-rw-r--r--sys/compat/linux/linux_emul.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_emul.c b/sys/compat/linux/linux_emul.c
index 69f1d08..639d403 100644
--- a/sys/compat/linux/linux_emul.c
+++ b/sys/compat/linux/linux_emul.c
@@ -300,13 +300,16 @@ linux_proc_exec(void *arg __unused, struct proc *p, struct image_params *imgp)
}
void
-linux_schedtail(void *arg __unused, struct proc *p)
+linux_schedtail(struct thread *td)
{
struct linux_emuldata *em;
+ struct proc *p;
int error = 0;
int *child_set_tid;
- if (__predict_true(p->p_sysent != &elf_linux_sysvec))
+ p = td->td_proc;
+
+ if (SV_PROC_ABI(p) != SV_ABI_LINUX)
return;
/* find the emuldata */
diff --git a/sys/compat/linux/linux_emul.h b/sys/compat/linux/linux_emul.h
index d517bfd..3acde64 100644
--- a/sys/compat/linux/linux_emul.h
+++ b/sys/compat/linux/linux_emul.h
@@ -82,7 +82,7 @@ struct linux_emuldata *em_find(struct proc *, int locked);
int linux_proc_init(struct thread *, pid_t, int);
void linux_proc_exit(void *, struct proc *);
-void linux_schedtail(void *, struct proc *);
+void linux_schedtail(struct thread *);
void linux_proc_exec(void *, struct proc *, struct image_params *);
void linux_kill_threads(struct thread *, int);
OpenPOWER on IntegriCloud