Shared/exclusive (rw) locks

Kris Kennaway kris at obsecurity.org
Tue Jul 6 01:08:45 PDT 2004


On Tue, Jul 06, 2004 at 05:17:32PM +1000, Tim Robbins wrote:
> On Tue, Jul 06, 2004 at 12:45:27PM +0600, ngl wrote:
> > That means, freebsd stable has no spin rwlocks ?
> 
> Right. Reader-writer spinlocks would not be very useful in FreeBSD 4; because
> only one thread can be running in the kernel at once, the only opportunity
> you'd have to share reader locks would be if you slept while holding a
> spinlock, which is a bad idea (and not permitted by FreeBSD 5 or Linux).
> If you want -rwlocks, you'll have to use lockmgr() (which is a sleep lock).

i.e. perhaps you really want to be using FreeBSD 5.

Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20040706/9ab45c87/attachment.bin


More information about the freebsd-stable mailing list