Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 May 2001 12:02:16 -0400 (EDT)
From:      Zhihui Zhang <zzhang@cs.binghamton.edu>
To:        freebsd-hackers@freebsd.org
Subject:   shared versus exclusive lock
Message-ID:  <Pine.SOL.4.21.0105241155240.6252-100000@onyx>

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

According to my reading of kern_lock.c, it does support shared lock.
However, we are still using LK_EXCLUSIVE mode more often than necessary.
If I want to look up a directory or to read a buffer, I should be able to
use the LK_SHARED lock. Right now, only few places I have found using
LK_SHARED, like in vn_read(). Is there any reason behind this?  If I want
to change this in my code, is there anything I should pay special
attention to? Thanks.

-Zhihui


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.4.21.0105241155240.6252-100000>