PERFORCE change 103708 for review
Roman Divacky
rdivacky at FreeBSD.org
Sat Aug 12 12:53:31 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=103708
Change 103708 by rdivacky at rdivacky_witten on 2006/08/12 12:53:19
Be more general and dont check for fbsd proc but for any non-linux proc. Also
use __predict_true() to minimalize impact of linux_proc_exit() hook in the most
probable case that non-linux proc is exiting.
Affected files ...
.. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#43 edit
Differences ...
==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#43 (text+ko) ====
@@ -1235,7 +1235,7 @@
struct thread *td = FIRST_THREAD_IN_PROC(p);
int *child_clear_tid;
- if (p->p_sysent != &elf_linux_sysvec)
+ if (__predict_true(p->p_sysent != &elf_linux_sysvec))
return;
/* find the emuldata */
@@ -1291,9 +1291,9 @@
void linux_proc_exec(void *arg __unused, struct proc *p, struct image_params *imgp)
{
if (__predict_false(imgp->sysent == &elf_linux_sysvec
- && p->p_sysent == &elf32_freebsd_sysvec))
+ && p->p_sysent != &elf_linux_sysvec))
linux_proc_init(FIRST_THREAD_IN_PROC(p), p->p_pid, 0);
- if (__predict_false(imgp->sysent == &elf32_freebsd_sysvec
+ if (__predict_false(imgp->sysent != &elf_linux_sysvec
&& p->p_sysent == &elf_linux_sysvec)) {
struct linux_emuldata *em;
More information about the p4-projects
mailing list