From owner-p4-projects@FreeBSD.ORG Wed Sep 12 23:27:11 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DE59216A46B; Wed, 12 Sep 2007 23:27:10 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACD0A16A420; Wed, 12 Sep 2007 23:27:10 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 4563E13C46C; Wed, 12 Sep 2007 23:27:10 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id E2FCB45E98; Thu, 13 Sep 2007 01:27:08 +0200 (CEST) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id E39D3456AB; Thu, 13 Sep 2007 01:27:01 +0200 (CEST) Date: Thu, 13 Sep 2007 01:25:41 +0200 From: Pawel Jakub Dawidek To: Attilio Rao Message-ID: <20070912232541.GG4909@garage.freebsd.pl> References: <200709120832.l8C8WLlm085731@repoman.freebsd.org> <20070912150017.GA3553@garage.freebsd.pl> <3bbf2fe10709121530h6d0681c4xa247fe7d31cb2c2e@mail.gmail.com> <20070912223833.GC4909@garage.freebsd.pl> <20070912230205.GF4909@garage.freebsd.pl> <3bbf2fe10709121618o3955b1fdm2cdca5b7fea8f6e4@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yZnyZsPjQYjG7xG7" Content-Disposition: inline In-Reply-To: <3bbf2fe10709121618o3955b1fdm2cdca5b7fea8f6e4@mail.gmail.com> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: Kip Macy , Perforce Change Reviews , Kip Macy Subject: Re: PERFORCE change 126330 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2007 23:27:11 -0000 --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 : > > 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--