Пример #1
0
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
}
Пример #2
0
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
}
Пример #3
0
static WRes Semaphore_Release(CSemaphore *p, LONG releaseCount, LONG *previousCount)
  { return BOOLToWRes(ReleaseSemaphore(*p, releaseCount, previousCount)); }
Пример #4
0
WRes Event_Reset(CEvent *p) { return BOOLToWRes(ResetEvent(*p)); }
Пример #5
0
WRes Event_Set(CEvent *p) { return BOOLToWRes(SetEvent(*p)); }
Пример #6
0
WRes Semaphore_Release(CSemaphore *p, LONG releaseCount, LONG *previousCount)
{
  return BOOLToWRes(ReleaseSemaphore(p->handle, releaseCount, previousCount));
}
Пример #7
0
WRes Event_Reset(CEvent *p) { return BOOLToWRes(ResetEvent(p->handle)); }