summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/PThreadCondition.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/tools/debugserver/source/PThreadCondition.h')
-rw-r--r--lldb/tools/debugserver/source/PThreadCondition.h32
1 files changed, 7 insertions, 25 deletions
diff --git a/lldb/tools/debugserver/source/PThreadCondition.h b/lldb/tools/debugserver/source/PThreadCondition.h
index 787cc7941d5..9cd64bf2472 100644
--- a/lldb/tools/debugserver/source/PThreadCondition.h
+++ b/lldb/tools/debugserver/source/PThreadCondition.h
@@ -16,38 +16,20 @@
#include <pthread.h>
-class PThreadCondition
-{
+class PThreadCondition {
public:
+ PThreadCondition() { ::pthread_cond_init(&m_condition, NULL); }
- PThreadCondition()
- {
- ::pthread_cond_init (&m_condition, NULL);
- }
+ ~PThreadCondition() { ::pthread_cond_destroy(&m_condition); }
- ~PThreadCondition()
- {
- ::pthread_cond_destroy (&m_condition);
- }
+ pthread_cond_t *Condition() { return &m_condition; }
- pthread_cond_t *Condition()
- {
- return &m_condition;
- }
+ int Broadcast() { return ::pthread_cond_broadcast(&m_condition); }
- int Broadcast()
- {
- return ::pthread_cond_broadcast (&m_condition);
- }
-
- int Signal()
- {
- return ::pthread_cond_signal (&m_condition);
- }
+ int Signal() { return ::pthread_cond_signal(&m_condition); }
protected:
- pthread_cond_t m_condition;
+ pthread_cond_t m_condition;
};
#endif
-
OpenPOWER on IntegriCloud