Date: Thu, 17 Aug 2006 08:12:09 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 104364 for review Message-ID: <200608170812.k7H8C9k2005172@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=104364 Change 104364 by rdivacky@rdivacky_witten on 2006/08/17 08:11:24 Sync with src in amd64ficition + amd64fy exit_group. Change the getpid() in amd64 version to lock the proc. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#22 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#22 (text+ko) ==== @@ -1331,6 +1331,7 @@ int linux_getpid(struct thread *td, struct linux_getpid_args *args) { +#ifdef __i386__ struct linux_emuldata *em; char osrel[LINUX_MAX_UTSNAME]; @@ -1345,6 +1346,11 @@ td->td_retval[0] = td->td_proc->p_pid; PROC_UNLOCK(td->td_proc); } +#else + PROC_LOCK(td->td_proc); + td->td_retval[0] = td->td_proc->p_pid; + PROC_UNLOCK(td->td_proc); +#endif return (0); } @@ -1364,6 +1370,7 @@ int linux_getppid(struct thread *td, struct linux_getppid_args *args) { +#ifdef __i386__ struct linux_emuldata *em; struct proc *p, *pp; char osrel[LINUX_MAX_UTSNAME]; @@ -1405,6 +1412,9 @@ EMUL_UNLOCK(&emul_lock); PROC_UNLOCK(pp); +#else + return getppid(td, (struct getppid_args *) args); +#endif return (0); } @@ -1471,6 +1481,7 @@ int linux_exit_group(struct thread *td, struct linux_exit_group_args *args) { +#ifdef __i386__ struct linux_emuldata *em, *td_em, *tmp_em; struct proc *sp; char osrel[LINUX_MAX_UTSNAME]; @@ -1502,6 +1513,7 @@ EMUL_SHARED_RUNLOCK(&emul_shared_lock); EMUL_UNLOCK(&emul_lock); } +#endif exit1(td, W_EXITCODE(args->error_code,0));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608170812.k7H8C9k2005172>