PERFORCE change 104364 for review
Roman Divacky
rdivacky at FreeBSD.org
Thu Aug 17 08:12:10 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=104364
Change 104364 by rdivacky at 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));
More information about the p4-projects
mailing list