On Wed, May 09, 2001 at 12:43:22PM +0200, Luke Kenneth Casson Leighton wrote:
[...]
> there may be some code / techniques in samba that may
> be worth examining: this is not at all dis-similar
> to file locking, except it happens to be memory, not
> files.
[...]
Yeah. tdb (already mentioned) is used in Samba to fully
implement NT locks on top of posix locks.
I'm neither a locking expert, but I remember, this is
needed for the same reasons already mentioned: same process
locking overlapping areas, etc.
NT seems to handle this stuff (nearly) properly and Samba
(TNG) has to do this on top of posix locks (which seem to
have shortcomings), so it has to do things _like_
refcounting.
Just my 2 dirham. ;)
Elrond