summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd
diff options
context:
space:
mode:
Diffstat (limited to 'libs/pbd/pbd')
-rw-r--r--libs/pbd/pbd/semutils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/pbd/pbd/semutils.h b/libs/pbd/pbd/semutils.h
index 6c661ab499..e81e33e533 100644
--- a/libs/pbd/pbd/semutils.h
+++ b/libs/pbd/pbd/semutils.h
@@ -55,10 +55,12 @@ class LIBPBD_API Semaphore {
int signal ();
int wait ();
+ int reset ();
#else
int signal () { return sem_post (ptr_to_sem()); }
int wait () { return sem_wait (ptr_to_sem()); }
+ int reset () { int rv = 0 ; while (sem_trywait (ptr_to_sem()) == 0) ++rv; return rv; }
#endif
};