[libc][NFC] Move the mutex implementation into a utility class.
authorSiva Chandra Reddy <sivachandra@google.com>
Thu, 26 Aug 2021 05:21:54 +0000 (05:21 +0000)
committerSiva Chandra Reddy <sivachandra@google.com>
Thu, 26 Aug 2021 18:49:20 +0000 (18:49 +0000)
commit004c7b1da6cfea1d1f09535607a8c7c2f051e8d5
tree44c074a47a6c1b93122cc5b232c2fdcb9581ae62
parent9cc0023fb863194be526f0bf19bd21e36236c5f6
[libc][NFC] Move the mutex implementation into a utility class.

This allows others parts of the libc to use the mutex types without
actually pulling in public function implementations.

Along the way, few cleanups have been done, like using a uniform type to
refer the linux futex word.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D108749
libc/src/threads/linux/CMakeLists.txt
libc/src/threads/linux/Futex.h [moved from libc/src/threads/linux/thread_utils.h with 55% similarity]
libc/src/threads/linux/Mutex.h [new file with mode: 0644]
libc/src/threads/linux/Thread.h [new file with mode: 0644]
libc/src/threads/linux/call_once.cpp
libc/src/threads/linux/mtx_init.cpp
libc/src/threads/linux/mtx_lock.cpp
libc/src/threads/linux/mtx_unlock.cpp
libc/src/threads/linux/thrd_create.cpp
libc/src/threads/linux/thrd_join.cpp