lkml.org 
[lkml]   [2002]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs/locks.c: Fix posix locking for threaded tasks
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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.682 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site