lkml.org 
[lkml]   [2002]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Lightweight userspace semaphores...
On Mon, 25 Feb 2002 11:32:40 -0500
Benjamin LaHaise <bcrl@redhat.com> wrote:

> On Mon, Feb 25, 2002 at 04:39:56PM +0000, Alan Cox wrote:
> > _alloca
> > mmap
> >
> > Still fits on the stack 8)
>
> Are we sure that forcing semaphore overhead to the size of a page is a
> good idea? I'd much rather see a sleep/wakeup mechanism akin to wait
> queues be exported by the kernel so that userspace can implement a rich
> set of locking functions on top of that in whatever shared memory is
> being used.

Unfortunately, no. You need to know what userspace is using them for so
you can check to avoid the "add to waitqueue" race.

AFAICT a mutex is the simplest useful primitive that can be realistically
exported.

Hope that helps,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
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:24    [W:0.147 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site