Add m_cond_broad_cast
This commit is contained in:
1 parent
b7c86ee01e
commit
df51c6dc64
2 files changed
+28
-1
No files matched your search
@@ -4072,7 +4072,14 @@ If the variable is not initialized, the behavior is undefined.
|
||||
|
||||
Within a mutex exclusive section,
|
||||
signal that the event associated to the variable cond of type m\_cond\_t
|
||||
has occured to other threads.
|
||||
has occured to at least a single thread.
|
||||
If the variable is not initialized, the behavior is undefined.
|
||||
|
||||
##### void m\_cond\_broadcast(m\_cond\_t cond)
|
||||
|
||||
Within a mutex exclusive section,
|
||||
signal that the event associated to the variable cond of type m\_cond\_t
|
||||
has occured to all waiting threads.
|
||||
If the variable is not initialized, the behavior is undefined.
|
||||
|
||||
##### void m\_cond\_wait(m\_cond\_t cond, m\_mutex\_t mutex)
|
||||
|
||||
@@ -77,6 +77,16 @@ static inline void m_cond_clear(m_cond_t c)
|
||||
cnd_signal(c);
|
||||
}
|
||||
|
||||
static inline void m_cond_signal(m_cond_t c)
|
||||
{
|
||||
cnd_signal(c);
|
||||
}
|
||||
|
||||
static inline void m_cond_broadcast(m_cond_t c)
|
||||
{
|
||||
cnd_broadcast(c);
|
||||
}
|
||||
|
||||
static inline void m_cond_wait(m_cond_t c, m_mutex_t m)
|
||||
{
|
||||
cnd_wait(c, m);
|
||||
@@ -169,6 +179,11 @@ static inline void m_cond_signal(m_cond_t c)
|
||||
PulseEvent(*c);
|
||||
}
|
||||
|
||||
static inline void m_cond_broadcast(m_cond_t c)
|
||||
{
|
||||
PulseEvent(*c);
|
||||
}
|
||||
|
||||
static inline void m_cond_wait(m_cond_t c, m_mutex_t m)
|
||||
{
|
||||
DWORD dwWaitResult = SignalObjectAndWait(*m, *c, INFINITE,FALSE);
|
||||
@@ -245,6 +260,11 @@ static inline void m_cond_signal(m_cond_t c)
|
||||
pthread_cond_signal(c);
|
||||
}
|
||||
|
||||
static inline void m_cond_broadcast(m_cond_t c)
|
||||
{
|
||||
pthread_cond_broadcast(c);
|
||||
}
|
||||
|
||||
static inline void m_cond_wait(m_cond_t c, m_mutex_t m)
|
||||
{
|
||||
pthread_cond_wait(c, m);
|
||||
|
||||
Reference in new issue
Block a user