This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/17168] New: Can GLibc expose futex now?


https://sourceware.org/bugzilla/show_bug.cgi?id=17168

            Bug ID: 17168
           Summary: Can GLibc expose futex now?
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: sstewartgallus00 at mylangara dot bc.ca
                CC: drepper.fsp at gmail dot com

Most application writers should use standard pthread synchronization
functionality and not use low level functionality instead.  However,
certain performance concerned programmers might want to use futexes
directly.  Unfortunately, as FUTEX_WAIT is a blocking system call this
leaves a critical piece of functionality unimplemented and missing.
In the past, one could have used FUTEX_FD to wait on memory locations
to change asynchronously (although it would have been racy).  However,
FUTEX_FD is not supported anymore on Linux (as it is racy).  Now, the
only choice to use FUTEX_WAIT asynchronously is to use multiple
threads and cancel the thread waiting on the memory location to
change.  Except one can't as futex is not exposed by GLibc and I do
not want to try reimplementing pthread_cancel myself which might be
seriously difficult.  Taking the five seconds to wrap the futex calls
with the syscall function is not a problem but I can't use futex
asynchronously without support from GLibc.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]