Date: Tue, 09 Jan 2001 09:48:32 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Greg Lehey <grog@lemis.com> Cc: FreeBSD SMP list <FreeBSD-smp@FreeBSD.org> Subject: RE: Allocating mutexes dynamically and WITNESS Message-ID: <XFMail.010109094832.jhb@FreeBSD.org> In-Reply-To: <20010109161915.C51397@wantadilla.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 09-Jan-01 Greg Lehey wrote: > I'm about to add a lock mutex to Vinum RAID-[45] plexes. Each plex > gets its own mutex, since it only applies to a specific plex. That's > fine in the normal case: I just add a MUTEX_DECLARE to the plex struct > definition and all is fine and dandy. But if I do this with WITNESS > defined, it tries to initialize it. Any thoughts about how to DTRT > here? Don't use MUTEX_DECLARE(). Just do a normal struct mtx foo and mtx_init(&foo); MUTEX_DECLARE doesn't work in structures, it only works for standalone mutexes, and hopefully won't be needed by any more mutexes than already use it. -- John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010109094832.jhb>