summaryrefslogtreecommitdiff
path: root/libc/src/threads/thrd_detach.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/threads/thrd_detach.cpp
parent2b3de2971790964691b351cc068f936eeeea32a4 (diff)
[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/threads/thrd_detach.cpp')
-rw-r--r--libc/src/threads/thrd_detach.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/src/threads/thrd_detach.cpp b/libc/src/threads/thrd_detach.cpp
index e3c4301709cd..20c6540faa17 100644
--- a/libc/src/threads/thrd_detach.cpp
+++ b/libc/src/threads/thrd_detach.cpp
@@ -14,11 +14,11 @@
namespace __llvm_libc {
-static_assert(sizeof(thrd_t) == sizeof(__llvm_libc::Thread<int>),
- "Mismatch between thrd_t and internal Thread<int>.");
+static_assert(sizeof(thrd_t) == sizeof(__llvm_libc::Thread),
+ "Mismatch between thrd_t and internal Thread.");
LLVM_LIBC_FUNCTION(int, thrd_detach, (thrd_t th)) {
- auto *thread = reinterpret_cast<Thread<int> *>(&th);
+ auto *thread = reinterpret_cast<Thread *>(&th);
thread->detach();
return 0;
}