From owner-p4-projects@FreeBSD.ORG Sun Aug 6 13:26:49 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 1764B16A4EB; Sun, 6 Aug 2006 13:26:49 +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 A624616A4DE for ; Sun, 6 Aug 2006 13:26:48 +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 AC1DE43D64 for ; Sun, 6 Aug 2006 13:26:46 +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 k76DQkjh060519 for ; Sun, 6 Aug 2006 13:26:46 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k76DQk6B060516 for perforce@freebsd.org; Sun, 6 Aug 2006 13:26:46 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sun, 6 Aug 2006 13:26:46 GMT Message-Id: <200608061326.k76DQk6B060516@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 103337 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: Sun, 06 Aug 2006 13:26:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=103337 Change 103337 by rdivacky@rdivacky_witten on 2006/08/06 13:26:24 A few small fixes: o in CLONE_PARENT_SETTID use the actual variable in sizeof o add dummy handler for CLONE_PARENT and add this flag o add handler for CLONE_THREAD which nulls exit_signal o copyout the correct pid in sched_tail Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#32 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#32 (text+ko) ==== @@ -358,7 +358,8 @@ #define CLONE_FS 0x200 #define CLONE_FILES 0x400 #define CLONE_SIGHAND 0x800 -#define CLONE_PID 0x1000 +#define CLONE_PID 0x1000 /* this flag does not exist in linux */ +#define CLONE_PARENT 0x00008000 #define CLONE_THREAD 0x10000 #define CLONE_SETTLS 0x80000 #define CLONE_CHILD_CLEARTID 0x00200000 @@ -432,13 +433,23 @@ EMUL_RUNLOCK(&emul_lock); return (EINVAL); } - error = copyout(&em->shared->group_pid, args->parent_tidptr, sizeof(td->td_proc->p_pid)); + error = copyout(&em->shared->group_pid, args->parent_tidptr, sizeof(em->shared->group_pid)); if (error) { EMUL_RUNLOCK(&emul_lock); return (error); } } + + if (args->flags & CLONE_PARENT) + printf("linux_clone: CLONE_PARENT\n"); + if (args->flags & CLONE_THREAD) { + // p2->p_pgrp = td->td_proc->p_pgrp; + // p2->p_pptr = td->td_proc->p_pptr; + exit_signal = 0; + printf("linux_clone: CLONE_THREADS\n"); + } + if (args->flags & CLONE_CHILD_SETTID) em->child_set_tid = args->child_tidptr; else @@ -1327,13 +1338,13 @@ if (em == NULL) { #ifdef DEBUG - // printf(LMSG("we didnt find emuldata for the userreting process.\n")); + printf(LMSG("we didnt find emuldata for the userreting process.\n")); #endif return; } if (em->child_set_tid != NULL) - error = copyout(&p->p_pid, em->child_set_tid, sizeof(p->p_pid)); + error = copyout(&em->shared->group_pid, em->child_set_tid, sizeof(em->shared->group_pid)); EMUL_RUNLOCK(&emul_lock); return;