diff options
Diffstat (limited to 'os_wrappers/Event.cpp')
-rw-r--r-- | os_wrappers/Event.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/os_wrappers/Event.cpp b/os_wrappers/Event.cpp index 0390735..cbe5aa3 100644 --- a/os_wrappers/Event.cpp +++ b/os_wrappers/Event.cpp @@ -44,13 +44,16 @@ void Event::signal() #endif } -void Event::wait(unsigned long timeout __attribute__((unused))) -{ #ifdef _WIN32 +void Event::wait(unsigned long timeout) +{ WaitForSingleObject(semaphore_, timeout); +} #else +void Event::wait(unsigned long timeout __attribute__((unused))) +{ sem_wait(&semaphore_); -#endif } +#endif /* @} */ |