diff options
| author | Petr Hosek <phosek@google.com> | 2020-01-15 13:58:29 -0800 |
|---|---|---|
| committer | Hans Wennborg <hans@chromium.org> | 2020-01-17 10:12:05 +0100 |
| commit | f06cd8c8c8e2adc5dad66a851bc1df1ecdd1b58e (patch) | |
| tree | f556ecb41d78f91e948c2e8db8820c053b63e679 /libcxx | |
| parent | cd4c65f91d5a77de28239979b772a8022dc6627a (diff) | |
| download | bcm5719-llvm-f06cd8c8c8e2adc5dad66a851bc1df1ecdd1b58e.tar.gz bcm5719-llvm-f06cd8c8c8e2adc5dad66a851bc1df1ecdd1b58e.zip | |
[libcxx] Use mtx_plain | mtx_recursive following C11 API
The C11 API specifies that to initialize a recursive mutex,
mtx_plain | mtx_recursive should be used with mtx_init.
Differential Revision: https://reviews.llvm.org/D72809
(cherry picked from commit 3481e5d7ed08d068a4e3427cb1afcd8bf2acafdc)
Diffstat (limited to 'libcxx')
| -rw-r--r-- | libcxx/include/__threading_support | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/__threading_support b/libcxx/include/__threading_support index 026429f6a8e..dbf313a1bf2 100644 --- a/libcxx/include/__threading_support +++ b/libcxx/include/__threading_support @@ -445,7 +445,7 @@ int __libcpp_tls_set(__libcpp_tls_key __key, void *__p) int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m) { - return mtx_init(__m, mtx_recursive) == thrd_success ? 0 : EINVAL; + return mtx_init(__m, mtx_plain | mtx_recursive) == thrd_success ? 0 : EINVAL; } int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m) |

