delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/08/22/14:15:08

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-Id: <4.2.2.20010822180506.00ba33f0@mail.online.no>
X-Sender: hardon AT mail DOT online DOT no
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.2
Date: Wed, 22 Aug 2001 20:07:28 +0200
To: cygwin AT cygwin DOT com
From: Gunnar Andre Dalsnes <hardon AT online DOT no>
Subject: Re: Help on posix file lock semantics
Cc: Kurt Roeckx <Q AT ping DOT be>
In-Reply-To: <20010822021939.A10144@ping.be>
References: <4 DOT 2 DOT 2 DOT 20010822010059 DOT 00ba5600 AT mail DOT online DOT no>
<4 DOT 2 DOT 2 DOT 20010821153100 DOT 00ba9ba0 AT mail DOT online DOT no>
<4 DOT 2 DOT 2 DOT 20010820221811 DOT 00b9d9a0 AT mail DOT online DOT no>
<4 DOT 2 DOT 2 DOT 20010819225911 DOT 00b94970 AT pop DOT online DOT no>
<4 DOT 2 DOT 2 DOT 20010819225911 DOT 00b94970 AT pop DOT online DOT no>
<20010820131824 DOT A200 AT ping DOT be>
<4 DOT 2 DOT 2 DOT 20010820221811 DOT 00b9d9a0 AT mail DOT online DOT no>
<20010821121135 DOT A7837 AT ping DOT be>
<4 DOT 2 DOT 2 DOT 20010821153100 DOT 00ba9ba0 AT mail DOT online DOT no>
<20010822003718 DOT A9717 AT ping DOT be>
<4 DOT 2 DOT 2 DOT 20010822010059 DOT 00ba5600 AT mail DOT online DOT no>
Mime-Version: 1.0

At 22.08.01 02:19 , you wrote:
>On Wed, Aug 22, 2001 at 01:31:39AM +0200, Gunnar Andre Dalsnes wrote:
> > At 22.08.01 00:37 , you wrote:
> > >
> > >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:-)
>
>The comment for posix_lock_file() in fs/locks.s says: 
>"We merge adjacent locks whenever possible.", so I guess it
>always does.

To sort this out ofa, I went out and got a copy of Suse, and this was what I got:

-if any separate adjacent locks with same type were set, they merged. (regardless of type)
-if a new lock overlapped existing lock with same type, they merged. (regardless of type)
-if a new read lock overlapped existing write lock, the overlapped region changed to type read.
-if a new write lock overlapped existing read lock, the overlapped region changed to type write.

Not very unlike our assumptions:-)

>Kurt

Now I have enough info on this, to continue on the hard part, the coding...
Thank you very much for your time, 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019