Date: Thu, 13 Sep 2007 01:25:41 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Attilio Rao <attilio@freebsd.org> Cc: Kip Macy <kip.macy@gmail.com>, Perforce Change Reviews <perforce@freebsd.org>, Kip Macy <kmacy@freebsd.org> Subject: Re: PERFORCE change 126330 for review Message-ID: <20070912232541.GG4909@garage.freebsd.pl> In-Reply-To: <3bbf2fe10709121618o3955b1fdm2cdca5b7fea8f6e4@mail.gmail.com> References: <200709120832.l8C8WLlm085731@repoman.freebsd.org> <20070912150017.GA3553@garage.freebsd.pl> <b1fa29170709121450r5f59430bqa13373fdf807cadc@mail.gmail.com> <3bbf2fe10709121530h6d0681c4xa247fe7d31cb2c2e@mail.gmail.com> <20070912223833.GC4909@garage.freebsd.pl> <b1fa29170709121549m7218965fs2682c8b5bd63e58b@mail.gmail.com> <20070912230205.GF4909@garage.freebsd.pl> <3bbf2fe10709121618o3955b1fdm2cdca5b7fea8f6e4@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--yZnyZsPjQYjG7xG7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 13, 2007 at 01:18:41AM +0200, Attilio Rao wrote: > 2007/9/13, Pawel Jakub Dawidek <pjd@freebsd.org>: > > On Wed, Sep 12, 2007 at 03:49:55PM -0700, Kip Macy wrote: > > > Andrew Thompson explicitly asked for the possibility of shared acquis= ition. > > > > A flag for callout_init_lock() will be enough? Or it wants it to be > > sometimes acquired shared and sometimes exclusive? >=20 > If it was me I would avoid the 'static' requirement for these stuffs. Actually I don't see why one would want to call the same handler with different locked lock. I think a flag for callout_init_lock() should be enough, exactly in the same way we have CALLOUT_RETURNUNLOCKED - we don't decide if the handler returns with lock unlock at callout_reset() time, but at callout_init_mtx() time. The thing is that you know the handler and you know if it needs to modify shared data or not at init time. And for the very uncommon cases, you can always downgrade the lock from within the handler. All in all, I think a flag for callout_init_lock() is enough. Do you feel convinced? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --yZnyZsPjQYjG7xG7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFG6HV1ForvXbEpPzQRAiQtAKDb59z9sc1+AMa2wWTMxsaB4rLJiQCg7uEP dI8eVoyy0Cv+QGLlofKlJZg= =DPX3 -----END PGP SIGNATURE----- --yZnyZsPjQYjG7xG7--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070912232541.GG4909>