From owner-p4-projects@FreeBSD.ORG Sat Aug 12 12:46:19 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7BEEB16A4DE; Sat, 12 Aug 2006 12:46:19 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5511216A4DA for ; Sat, 12 Aug 2006 12:46:19 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF92B43D53 for ; Sat, 12 Aug 2006 12:46:18 +0000 (GMT) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k7CCkIOE024017 for ; Sat, 12 Aug 2006 12:46:18 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7CCkIR9024014 for perforce@freebsd.org; Sat, 12 Aug 2006 12:46:18 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sat, 12 Aug 2006 12:46:18 GMT Message-Id: <200608121246.k7CCkIR9024014@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 103705 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Aug 2006 12:46:19 -0000 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