[email protected]
[Top] [All Lists]

Re: PERFORCE change 114200 for review

Subject: Re: PERFORCE change 114200 for review
From: Divacky Roman
Date: Wed, 7 Feb 2007 22:54:45 +0100
On Wed, Feb 07, 2007 at 09:50:08PM +0100, Attilio Rao wrote:
> 2007/2/7, Roman Divacky <[email protected]>:
> >http://perforce.freebsd.org/chv.cgi?CH=114200
> >
> >Change 114200 by [email protected]_witten on 2007/02/07 18:57:25
> >
> >       Move the free() out of the emul_shared_lock coverage as its not
> >       sleepable lock anymore.
> >
> >Affected files ...
> >
> >.. //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#35 edit
> >
> >Differences ...
> >
> >==== //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#35 
> >(text+ko) ====
> >
> >@@ -187,9 +187,11 @@
> >       LIST_REMOVE(em, threads);
> >
> >       em->shared->refs--;
> >-       if (em->shared->refs == 0)
> >+       if (em->shared->refs == 0) {
> >+               EMUL_SHARED_WUNLOCK(&emul_shared_lock);
> >               free(em->shared, M_LINUX);
> >-       EMUL_SHARED_WUNLOCK(&emul_shared_lock);
> >+       } else
> >+               EMUL_SHARED_WUNLOCK(&emul_shared_lock);
> >
> >       if (child_clear_tid != NULL) {
> >               struct linux_sys_futex_args cup;
> >@@ -274,9 +276,11 @@
> >               PROC_UNLOCK(p);
> >
> >               em->shared->refs--;
> >-               if (em->shared->refs == 0)
> >+               if (em->shared->refs == 0) {
> >+                       EMUL_SHARED_WUNLOCK(&emul_shared_lock);
> >                       free(em->shared, M_LINUX);
> >-               EMUL_SHARED_WUNLOCK(&emul_shared_lock);
> >+               } else
> >+                       EMUL_SHARED_WUNLOCK(&emul_shared_lock);
> >
> >               free(em, M_LINUX);
> >       }
> >
> 
> Would you convert em->shared->refs with a refcount() ? (sys/refcount.h)

as we discussed. its not much of a use in this particular case
as I have to lock anyway so this doesnt buy us much.

thnx, roman
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/p4-projects
To unsubscribe, send any mail to "[email protected]"

<Prev in Thread] Current Thread [Next in Thread>