diff options
| author | Siva Chandra Reddy <sivachandra@google.com> | 2022-06-23 18:18:50 +0000 |
|---|---|---|
| committer | Siva Chandra Reddy <sivachandra@google.com> | 2022-06-24 08:22:53 +0000 |
| commit | f4580c6d5a44379f3b1be033f39ec7af78dbbbfa (patch) | |
| tree | f752af3d381abea1fd73fe38a903c54e4d93ff2d /libc/src/threads/thrd_create.cpp | |
| parent | 2b3de2971790964691b351cc068f936eeeea32a4 (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_create.cpp')
| -rw-r--r-- | libc/src/threads/thrd_create.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/src/threads/thrd_create.cpp b/libc/src/threads/thrd_create.cpp index 91b36a71f823..9e81f0fdf78c 100644 --- a/libc/src/threads/thrd_create.cpp +++ b/libc/src/threads/thrd_create.cpp @@ -15,12 +15,12 @@ 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_create, (thrd_t * th, thrd_start_t func, void *arg)) { - auto *thread = reinterpret_cast<__llvm_libc::Thread<int> *>(th); + auto *thread = reinterpret_cast<__llvm_libc::Thread *>(th); int result = thread->run(func, arg, nullptr, 0); if (result == 0) return thrd_success; |
