mp: semaphores: add a new function semaphore-wait

This function offers a functionality similar to sbcl, namely allows
specifying the timeout and the resource count.
This commit is contained in:
Daniel Kochmański 2021-10-19 11:16:18 +02:00
parent e83f278f17
commit bf62cd9d40
4 changed files with 68 additions and 36 deletions

View file

@ -1513,8 +1513,9 @@
#+threads (proclamation mp:semaphore-name (mp:semaphore) t :reader)
#+threads (proclamation mp:semaphore-count (mp:semaphore) fixnum :reader)
#+threads (proclamation mp:semaphore-wait-count (mp:semaphore) natural :reader)
#+threads (proclamation mp:wait-on-semaphore (mp:semaphore) fixnum)
#+threads (proclamation mp:try-get-semaphore (mp:semaphore) t)
#+threads (proclamation mp:semaphore-wait (mp:semaphore fixnum real) t)
#+threads (proclamation mp:wait-on-semaphore (mp:semaphore &key) t)
#+threads (proclamation mp:try-get-semaphore (mp:semaphore &optional fixnum) t)
#+threads (proclamation mp:signal-semaphore (mp:semaphore &optional fixnum) t)
;;;