This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Help on posix file lock semantics


At 22.08.01 00:37 , you wrote:
>On Wed, Aug 22, 2001 at 12:11:02AM +0200, Gunnar Andre Dalsnes wrote:
> > At 21.08.01 12:11 , you wrote:
> > >On Mon, Aug 20, 2001 at 10:55:54PM +0200, Gunnar Andre Dalsnes wrote:
> > > > At 20.08.01 13:18 , you wrote:
> > > > >On Sun, Aug 19, 2001 at 11:06:13PM +0200, Gunnar Andre Dalsnes wrote:
> > > > 
> > > > And locks outside of upgraded regions are resized to fit and kept as standalone locks?
> > > > 
> > > > Example:
> > > > A file has write lock from off. 10 to 20 and read lock from off. 30 to 40.
> > > > A new read lock from off. 15 to 35 upgrades both existing overlapped regions.
> > > > 
> > > > Now we have three locks?
> > > > -write lock off. 10 to 15
> > > > -read lock off. 15 to 35
> > > > -read lock off. 35 to 40
> > > > 
> > > > Or maybe they merged? 
> > > > -write lock off. 10 to 15
> > > > -read lock off. 15 to 40

I don't know if we have a misunderstanding here, 
but it's not like I merged them, but possibly automagically by the (linux) os kernel, which I want to emulate...

> > > > 
> > > > The reason i ask is that i want F_GETLK to behave correctly if called afterwards.
> > >
> > >Thinking about it again ...
> > >
> > >Other times you don't merge.  If you had 10 to 19, and then get
> > >20 to 29, both same lock, would you merge them?  I don't think
> > >so.
> > 
> > What do you mean? Would I merge them?
>
>Those 2 regions follow each other.  I think you're not supposed
>to merge those regions even if you could.
>
>If you don't merge regions in any other case, why would you
>suddenly want to merge them in the case of overlapping regions?

But if the (linux) os kernel does it automagically for us, I want to do it too:-)



>Kurt

Gunnar


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]