lkml.org 
[lkml]   [2002]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RFC] Lightweight user-level semaphores
Matthew Kirkwood wrote:
>
>
> Yep, that'd be fine. However, you then lose the neatness
> of "lock==file descriptor", and need something other than
> read/write for down/up.
>
pread(), use the file pointer.

>
> I guess the alternative is to store them in a hash table
> or tree but I don't know what that would do to the
> contended case.
>
I'd start with file descriptor+pread(), and then check how much faster
your could get without any protection at all (i.e. just trust user
space). If the difference is small, then use the file descriptor.

--
Manfred
-
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:15    [W:0.041 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site