WRes Event_Reset(CEvent *p) { #if defined(__APPLE__) pthread_mutex_lock(&p->_mutex); p->_state = False; pthread_mutex_unlock(&p->_mutex); return 0; #else return BOOLToWRes(ResetEvent(*p)); #endif }
WRes Event_Set(CEvent *p) { #if defined(__APPLE__) pthread_mutex_lock(&p->_mutex); p->_state = True; pthread_cond_broadcast(&p->_cond); pthread_mutex_unlock(&p->_mutex); return 0; #else return BOOLToWRes(SetEvent(*p)); #endif }
static WRes Semaphore_Release(CSemaphore *p, LONG releaseCount, LONG *previousCount) { return BOOLToWRes(ReleaseSemaphore(*p, releaseCount, previousCount)); }
WRes Event_Reset(CEvent *p) { return BOOLToWRes(ResetEvent(*p)); }
WRes Event_Set(CEvent *p) { return BOOLToWRes(SetEvent(*p)); }
WRes Semaphore_Release(CSemaphore *p, LONG releaseCount, LONG *previousCount) { return BOOLToWRes(ReleaseSemaphore(p->handle, releaseCount, previousCount)); }
WRes Event_Reset(CEvent *p) { return BOOLToWRes(ResetEvent(p->handle)); }