| 78 | } |
| 79 | |
| 80 | int EventWait (SWelsDecEvent* e, int32_t timeout) { |
| 81 | DWORD result; |
| 82 | if ((uint32_t)timeout == WELS_DEC_THREAD_WAIT_INFINITE || timeout < 0) |
| 83 | result = WaitForSingleObject (e->h, INFINITE); |
| 84 | else |
| 85 | result = WaitForSingleObject (e->h, timeout); |
| 86 | |
| 87 | if (result == WAIT_OBJECT_0) |
| 88 | return WELS_DEC_THREAD_WAIT_SIGNALED; |
| 89 | else |
| 90 | return WAIT_TIMEOUT; |
| 91 | } |
| 92 | |
| 93 | void EventDestroy (SWelsDecEvent* e) { |
| 94 | CloseHandle (e->h); |
nothing calls this directly
no test coverage detected