PERFORCE change 112534 for review
John Baldwin
jhb at freebsd.org
Fri Jan 5 11:27:37 PST 2007
On Friday 05 January 2007 02:54, Roman Divacky wrote:
> http://perforce.freebsd.org/chv.cgi?CH=112534
>
> Change 112534 by rdivacky at rdivacky_witten on 2007/01/05 07:53:57
>
> Dont lock em in a case of just using em->shared->group_pid because
> the group_pid never changes.
Is em->shared static for the lifetime of an em object?
> Affected files ...
>
> .. //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#50 edit
> .. //depot/projects/linuxolator/src/sys/compat/linux/linux_signal.c#9 edit
>
> Differences ...
>
> ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#50
(text+ko) ====
>
> @@ -1448,10 +1448,9 @@
> #endif
>
> if (linux_use26(td)) {
> - em = em_find(td->td_proc, EMUL_DOLOCK);
> + em = em_find(td->td_proc, EMUL_DONTLOCK);
> KASSERT(em != NULL, ("getpid: emuldata not found.\n"));
> td->td_retval[0] = em->shared->group_pid;
> - EMUL_UNLOCK(&emul_lock);
> } else {
> td->td_retval[0] = td->td_proc->p_pid;
> }
> @@ -1490,7 +1489,7 @@
> return (0);
> }
>
> - em = em_find(td->td_proc, EMUL_DOLOCK);
> + em = em_find(td->td_proc, EMUL_DONTLOCK);
>
> KASSERT(em != NULL, ("getppid: process emuldata not found.\n"));
>
> @@ -1519,7 +1518,6 @@
> } else
> td->td_retval[0] = pp->p_pid;
>
> - EMUL_UNLOCK(&emul_lock);
> PROC_UNLOCK(pp);
>
> return (0);
>
> ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_signal.c#9
(text+ko) ====
>
> @@ -561,7 +561,7 @@
>
> PROC_UNLOCK(p);
>
> - em = em_find(p, EMUL_DOLOCK);
> + em = em_find(p, EMUL_DONTLOCK);
>
> if (em == NULL) {
> #ifdef DEBUG
> @@ -573,8 +573,6 @@
> if (em->shared->group_pid != args->tgid)
> return ESRCH;
>
> - EMUL_UNLOCK(&emul_lock);
> -
> return linux_kill(td, &ka);
> }
>
>
--
John Baldwin
More information about the p4-projects
mailing list