summaryrefslogtreecommitdiff
path: root/libc/src/__support/threads/thread.cpp
diff options
context:
space:
mode:
authorSiva Chandra Reddy <sivachandra@google.com>2022-07-12 21:50:03 +0000
committerSiva Chandra Reddy <sivachandra@google.com>2022-07-14 20:12:35 +0000
commit8dc42802f7052d2eed4f2267851b94578c0152fc (patch)
treed54ba9a77077f7c25cf3470ea6fdd22312efd088 /libc/src/__support/threads/thread.cpp
parentd55dfeaf32e8a88f0c6e7240fb2a8a1b57d89380 (diff)
[libc] Add implementations of pthread_equal and pthread_self.
Reviewed By: michaelrj, lntue Differential Revision: https://reviews.llvm.org/D129729
Diffstat (limited to 'libc/src/__support/threads/thread.cpp')
-rw-r--r--libc/src/__support/threads/thread.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/libc/src/__support/threads/thread.cpp b/libc/src/__support/threads/thread.cpp
index 1ca78ece703d..6149f7724fca 100644
--- a/libc/src/__support/threads/thread.cpp
+++ b/libc/src/__support/threads/thread.cpp
@@ -6,5 +6,10 @@
//
//===----------------------------------------------------------------------===//
-// This file is currently emtpy. In future, declaration of a self thread object
-// etc. will be added here.
+#include "thread.h"
+
+namespace __llvm_libc {
+
+thread_local Thread self;
+
+} // namespace __llvm_libc