aboutsummaryrefslogtreecommitdiff
path: root/libc/src/pthread/pthread_create.cpp
diff options
context:
space:
mode:
authorSiva Chandra Reddy <sivachandra@google.com>2022-06-23 18:18:50 +0000
committerSiva Chandra Reddy <sivachandra@google.com>2022-06-24 08:22:53 +0000
commitf4580c6d5a44379f3b1be033f39ec7af78dbbbfa (patch)
treef752af3d381abea1fd73fe38a903c54e4d93ff2d /libc/src/pthread/pthread_create.cpp
parent2b3de2971790964691b351cc068f936eeeea32a4 (diff)
downloadllvm-f4580c6d5a44379f3b1be033f39ec7af78dbbbfa.zip
llvm-f4580c6d5a44379f3b1be033f39ec7af78dbbbfa.tar.gz
llvm-f4580c6d5a44379f3b1be033f39ec7af78dbbbfa.tar.bz2
[libc][NFC] Remove the templatization from the linux implementation of thread.
This enables setting up a single "self" thread object to be returned by API like thrd_self and pthread_self.
Diffstat (limited to 'libc/src/pthread/pthread_create.cpp')
-rw-r--r--libc/src/pthread/pthread_create.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/src/pthread/pthread_create.cpp b/libc/src/pthread/pthread_create.cpp
index bc945a9..ec1e0e3 100644
--- a/libc/src/pthread/pthread_create.cpp
+++ b/libc/src/pthread/pthread_create.cpp
@@ -16,14 +16,14 @@
namespace __llvm_libc {
-static_assert(sizeof(pthread_t) == sizeof(__llvm_libc::Thread<int>),
- "Mismatch between pthread_t and internal Thread<int>.");
+static_assert(sizeof(pthread_t) == sizeof(__llvm_libc::Thread),
+ "Mismatch between pthread_t and internal Thread.");
LLVM_LIBC_FUNCTION(int, pthread_create,
(pthread_t *__restrict th,
const pthread_attr_t *__restrict attr,
__pthread_start_t func, void *arg)) {
- auto *thread = reinterpret_cast<__llvm_libc::Thread<void *> *>(th);
+ auto *thread = reinterpret_cast<__llvm_libc::Thread *>(th);
int result = thread->run(func, arg, nullptr, 0);
if (result != 0 && result != EPERM)
return EAGAIN;