< prev index next >
src/os/posix/vm/os_posix.hpp
Print this page
@@ -92,9 +92,17 @@
class PosixSemaphore : public Semaphore {
public:
PosixSemaphore(uint value = 0) : Semaphore(value) {}
bool trywait();
+ bool timedwait(unsigned int sec, int nsec) {
+ return timedwait(create_timespec(sec, nsec));
+ }
+
+ private:
bool timedwait(struct timespec ts);
+
+ // OS specific implementation to create a timespec suitable for semaphores.
+ static struct timespec create_timespec(unsigned int set, int nsec);
};
#endif // OS_POSIX_VM_OS_POSIX_HPP
< prev index next >