[PATCH] D28226: threading_support: introduce __libcpp_recursive_mutex_t
Saleem Abdulrasool via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 3 17:40:53 PST 2017
compnerd marked 3 inline comments as done.
compnerd added inline comments.
================
Comment at: include/__threading_support:91
+ {
+ return reinterpret_cast<__libcpp_mutex_t*>(__value);
+ }
----------------
EricWF wrote:
> Wouldn't a `static_cast` be valid here?
Yeah.
================
Comment at: include/__threading_support:110
+int __libcpp_mutex_lock(__libcpp_mutex_reference&& __m);
_LIBCPP_THREAD_ABI_VISIBILITY
----------------
EricWF wrote:
> This uses C++11 features but is limited to C++03. Although we can technically cheat and use Clang extended rvalue references here.
Switched to pass-by-value.
================
Comment at: include/__threading_support:112
_LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_mutex_trylock(__libcpp_mutex_t *__m);
+int __libcpp_mutex_trylock(__libcpp_mutex_reference&& __m);
----------------
EricWF wrote:
> Won't we ever want to pass an lvalue here?
Just changed it to a pass-by-value, which is a l-value.
Repository:
rL LLVM
https://reviews.llvm.org/D28226
More information about the cfe-commits
mailing list