semaphore: add support for multiple units in wait() and post()

Operating Systems / OSv - Avi Kivity [cloudius-systems.com] - 22 May 2013 02:28 UTC

Use Nadav's idea of iterating over the list and selecting wait records that fit the available units.

c240daa semaphore: add support for multiple units in wait() and post()
core/semaphore.cc | 39 ++++++++++++++++++++-------------------
include/osv/semaphore.hh | 7 ++++---
2 files changed, 24 insertions(+), 22 deletions(-)

Upstream: github.com


  • Share