Date: Sat, 12 Aug 2006 12:46:18 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 103705 for review Message-ID: <200608121246.k7CCkIR9024014@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=103705 Change 103705 by rdivacky@rdivacky_witten on 2006/08/12 12:45:48 Introduce LINUX_NPTL options to kernel config. This enables/disables pid mangling for 2.6 emulation. This also switches osreleasename between 2.4.2 and 2.6.16. All my other changes are in place because I want to test them and the plan is to have 2.6.16 emulation only and not paralell emulation of 2.4.2 and 2.6.16. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_mib.c#6 edit .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#11 edit .. //depot/projects/soc2006/rdivacky_linuxolator/conf/options.amd64#3 edit .. //depot/projects/soc2006/rdivacky_linuxolator/conf/options.i386#3 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_mib.c#6 (text+ko) ==== @@ -81,7 +81,11 @@ 0, 0, linux_sysctl_osname, "A", "Linux kernel OS name"); +#ifdef LINUX_NPTL static char linux_osrelease[LINUX_MAX_UTSNAME] = "2.6.16"; +#else +static char linux_osrelease[LINUX_MAX_UTSNAME] = "2.4.2"; +#endif static int linux_sysctl_osrelease(SYSCTL_HANDLER_ARGS) ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#11 (text+ko) ==== @@ -1333,6 +1333,7 @@ int linux_getpid(struct thread *td, struct linux_getpid_args *args) { +#ifdef LINUX_NTPL struct linux_emuldata *em; em = em_find(td->td_proc, EMUL_UNLOCKED); @@ -1341,12 +1342,16 @@ td->td_retval[0] = em->shared->group_pid; EMUL_UNLOCK(&emul_lock); +#else + td->td_retval[0] = td->td_proc->p_pid; +#endif return (0); } int linux_getppid(struct thread *td, struct linux_getppid_args *args) { +#ifdef LINUX_NTPL struct linux_emuldata *em; struct proc *p, *pp; @@ -1381,6 +1386,9 @@ PROC_UNLOCK(pp); return (0); +#else + return getppid(td, (struct getppid_args *) args); +#endif } int ==== //depot/projects/soc2006/rdivacky_linuxolator/conf/options.amd64#3 (text+ko) ==== @@ -20,6 +20,7 @@ LINPROCFS opt_dontuse.h LINSYSFS opt_dontuse.h NDISAPI opt_dontuse.h +LINUX_NPTL opt_compat.h CLK_CALIBRATION_LOOP opt_clock.h CLK_USE_I8254_CALIBRATION opt_clock.h ==== //depot/projects/soc2006/rdivacky_linuxolator/conf/options.i386#3 (text+ko) ==== @@ -29,6 +29,7 @@ NDISAPI opt_dontuse.h PECOFF_DEBUG opt_pecoff.h PECOFF_SUPPORT opt_dontuse.h +LINUX_NPTL opt_compat.h # Change KVM size. Changes things all over the kernel. KVA_PAGES opt_global.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608121246.k7CCkIR9024014>