[LLVMbugs] [Bug 20749] New: libc++ assumes too much about pthread_t

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 25 15:53:48 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20749

            Bug ID: 20749
           Summary: libc++ assumes too much about pthread_t
           Product: libc++
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kaballo86 at hotmail.com
                CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
    Classification: Unclassified

libc++ assumes that `pthread_t` is either `void*` or `long`, but a conformant
implementation can choose to use a struct instead. This is useful, for
instance, to add a reuse counter so as to reduce collisions on reused ids.

Unfortunately, the only thing one can do with `pthread_t` is to compare two
*valid* ids via `pthread_equal`, so for implementations where it is a struct,
it is not suitable to implement `std::thread::id`.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140825/ca58d491/attachment.html>


More information about the llvm-bugs mailing list