Matthew Dillon wrote:
:It seems then that I was wrong. I misunderstood the meaning of the lock
:flags. I thought LK_RETRY is the way for making the lock acquisition
:blocking, and without that the lock acquisition becomes non-blocking :and thence fallible.
:
:Sorry for arguing based on a confused perception of the concepts
:involved.

    This is a very common mistake, and it's really the fault of the lockmgr
    code, not you.  The original designers of the lockmgr code in their
infinite wisdom made the locking code not retry a blocked lock by default. It's absolutely the wrong way to do it. So if you do a lockmgr LK_EXCLUSIVE without LK_RETRY, it will still block, but it won't retry after it unblocks.

what?  which use could this have, ever?  what happens then when it unblocks, 
will it just sleep or will it fail after the lock becomes free again?

cheers
 simon

--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to