]> git.corax.cc Git - toolbox/commit
include/{mutex,wmutex}: Wait forever if timeout is 0 or missing
authorMatthias Kruk <matthias.kruk@miraclelinux.com>
Sun, 6 Jun 2021 02:42:13 +0000 (11:42 +0900)
committerMatthias Kruk <matthias.kruk@miraclelinux.com>
Sun, 6 Jun 2021 02:42:13 +0000 (11:42 +0900)
commitfd653075f8dd8ff2676c474fdbc38557962d623c
tree2daee8656bf7b525d77748a3002d3a4aeab16a76
parent005ec83231e9ce90fd601fa34ac2585d13b008fd
include/{mutex,wmutex}: Wait forever if timeout is 0 or missing

The mutex_lock() and wmutex_lock() functions return immediately if
the timeout is set to 0 or is missing. However, to be compatible with
the previous timeout-less implementations, the functions must wait
forever if no timeout was specified.
This commit changes the two functions so they wait forever if the
timeout is 0 or missing.
include/mutex.sh
include/wmutex.sh