MCPcopy Create free account
hub / github.com/diasurgical/devilution / WaitForEvent

Function WaitForEvent

SourceX/thread.cpp:65–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65int WaitForEvent(event_emul *e)
66{
67 if (SDL_LockMutex(e->mutex) <= -1) {
68 ErrSdl();
69 }
70 int ret = SDL_CondWait(e->cond, e->mutex);
71 if (ret <= -1 || SDL_CondSignal(e->cond) <= -1 || SDL_UnlockMutex(e->mutex) <= -1) {
72 SDL_Log(SDL_GetError());
73 return -1;
74 }
75 return ret;
76}
77
78}

Callers 1

dthread_handlerFunction · 0.85

Calls 1

SDL_LogFunction · 0.85

Tested by

no test coverage detected