[libc-commits] [PATCH] D74653: [libc] Add simple implementations of mtx_lock and mtx_unlock.
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Feb 19 10:50:37 PST 2020
sivachandra marked an inline comment as done.
sivachandra added inline comments.
================
Comment at: libc/src/threads/linux/mutex.h:17
+// made only if the mutex status is `MS_Waiting`.
+enum MutexStatus : uint32_t { MS_Free, MS_Locked, MS_Waiting };
+
----------------
abrachet wrote:
> We could make this `enum class MutexStatus` and drop the MS_ prefix and refer to these as `MutexStatus::Free` perhaps.
That would be nice, but then we will need casts to integer types as `stdatomic.h` API wants integer types.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74653/new/
https://reviews.llvm.org/D74653
More information about the libc-commits
mailing list