From: Matthew Wilcox <willy@debian.org>
To: Matthew Wilcox <willy@debian.org>
Cc: Linus Torvalds <torvalds@transmeta.com>,
Marcelo Tosatti <marcelo@conectiva.com.br>,
Saurabh Desai <sdesai@austin.ibm.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs/locks.c: Fix posix locking for threaded tasks
Date: Mon, 10 Jun 2002 21:30:31 +0100 [thread overview]
Message-ID: <20020610213031.G27449@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20020610034843.W27186@parcelfarce.linux.theplanet.co.uk> <20020610064120.GH20388@turbolinux.com> <20020610134119.D27449@parcelfarce.linux.theplanet.co.uk>
On Mon, Jun 10, 2002 at 01:41:19PM +0100, Matthew Wilcox wrote:
> On Mon, Jun 10, 2002 at 12:41:20AM -0600, Andreas Dilger wrote:
> > Otherwise, this change makes it impossible to write a multi-threaded
> > program that _does_ allow you use locking between threads. If anything,
> > this PID check could be conditional on some extra lock flag (e.g.
> > THREADS_SHARE_LOCKS or whatever).
>
> if you're locking between threads, you should be using posix thread
> mutexes, not file locks, IMO. There's nothing in SUS v3 which says
> you can do what you've described.
the light dawned... of course it doesn't say. If you have userlevel
threads (or some M:N system), either you force the threading library
to reimplement the fcntl lock interface, or they have to share locks.
I can't imagine that even the posix threading people require a
reimplementation of the grotesque solaris file locking scheme in
userspace.
--
Revolutions do not require corporate support.
next prev parent reply other threads:[~2002-06-10 20:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-10 2:48 [PATCH] fs/locks.c: Fix posix locking for threaded tasks Matthew Wilcox
2002-06-10 6:41 ` Andreas Dilger
2002-06-10 12:41 ` Matthew Wilcox
2002-06-10 20:30 ` Matthew Wilcox [this message]
2002-06-12 9:40 ` Alan Cox
2002-06-12 11:45 ` Matthew Wilcox
2002-06-12 22:18 ` Saurabh Desai
2002-06-12 22:33 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020610213031.G27449@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=sdesai@austin.ibm.com \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox