[LLVMbugs] [Bug 23019] missing native_handle_type in timed_mutex classes

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 25 08:16:17 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23019

Marshall Clow (home) <mclow.lists at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Marshall Clow (home) <mclow.lists at gmail.com> ---
This was deliberate:

The native_type is only available if the C++ object is a thin wrapper around a
native type.  If the client is aware of the native type and wants access to API
that is provided by the OS, and not by the std::lib, this is the way he can get
it, albeit non-portably.  Things like setting thread priority were in mind when
this feature was designed.

libc++ did not implement timed_mutex and recursive_timed_mutex as thin wrappers
around an OS-provided type, and so native_type is purposefully missing from
those classes.  Providing unfettered access to one of the fields in those
classes might break class invariants among the fields.

-- 
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/20150325/be84c5ae/attachment.html>


More information about the llvm-bugs mailing list