Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-Id: <4.2.2.20010821153100.00ba9ba0@mail.online.no>
X-Sender: hardon@mail.online.no (Unverified)
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.2 
Date: Wed, 22 Aug 2001 00:11:02 +0200
To: cygwin@cygwin.com
From: Gunnar Andre Dalsnes <hardon@online.no>
Subject: Re: Help on posix file lock semantics
Cc: Kurt Roeckx <Q@ping.be>
In-Reply-To: <20010821121135.A7837@ping.be>
References: <4.2.2.20010820221811.00b9d9a0@mail.online.no>
 <4.2.2.20010819225911.00b94970@pop.online.no>
 <4.2.2.20010819225911.00b94970@pop.online.no>
 <20010820131824.A200@ping.be>
 <4.2.2.20010820221811.00b9d9a0@mail.online.no>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"

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
> > 
> > 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?

>I think the first one is the correct one.
>
>Btw, I think my English isn't good enough to remember what "to"
>means.  Is the last number included or not?  

It's not:-} Sorry...

>If it's included
>your example was wrong, since you locked byte twice.
>
>
>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/

