Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2003 13:35:43 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   RE: PERFORCE change 25536 for review
Message-ID:  <XFMail.20030221133543.jhb@FreeBSD.org>
In-Reply-To: <200302211742.h1LHgptx095984@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 21-Feb-2003 John Baldwin wrote:
> http://perforce.freebsd.org/chv.cgi?CH=25536
> 
> Change 25536 by jhb@jhb_laptop on 2003/02/21 09:41:54
> 
>       Real eventhandler locking without evilness.  Highlights:
>       - Uses mutex rather than a sx lock for each list.
>       - We use a runcount that we increment when starting to invoke a
>         list and decrement when finished invoking a list.
>       - When deleteing a handler, if the runcount is not 0, we mark
>         the event as dead using a reserved priority value (-1) rather
>         than removing it from the list right then and there.
>       - When we finish invoking a list and the runcount goes down to 0,
>         we prune the list of any dead handlers.
>       - A bit more sane locking is used.
>       - All the %^&#ing code duplication in the invoke methods is gone
>         by having the two invoke macros lookup and lock the list before
>         calling a common macro.
>       - The pruning of the list is a function so as to not bloat the
>         invoke macros too much.

Cons: not compiled or tested yet. :)

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030221133543.jhb>