Date: Sun, 6 Aug 2006 13:26:46 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 103337 for review Message-ID: <200608061326.k76DQk6B060516@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608061326.k76DQk6B060516>