diff options
Diffstat (limited to 'llvm/include/llvm/Support/ThreadPool.h')
| -rw-r--r-- | llvm/include/llvm/Support/ThreadPool.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/include/llvm/Support/ThreadPool.h b/llvm/include/llvm/Support/ThreadPool.h index 528fb32525eb..4c41b88d6043 100644 --- a/llvm/include/llvm/Support/ThreadPool.h +++ b/llvm/include/llvm/Support/ThreadPool.h @@ -10,8 +10,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_SUPPORT_THREAD_POOL_H -#define LLVM_SUPPORT_THREAD_POOL_H +#ifndef LLVM_SUPPORT_THREADPOOL_H +#define LLVM_SUPPORT_THREADPOOL_H #include "llvm/Config/llvm-config.h" #include "llvm/Support/Threading.h" @@ -70,6 +70,9 @@ public: unsigned getThreadCount() const { return ThreadCount; } + /// Returns true if the current thread is a worker thread of this thread pool. + bool isWorkerThread() const; + private: bool workCompletedUnlocked() { return !ActiveThreads && Tasks.empty(); } @@ -102,4 +105,4 @@ private: }; } -#endif // LLVM_SUPPORT_THREAD_POOL_H +#endif // LLVM_SUPPORT_THREADPOOL_H |
