diff --git a/src/sysc/scc/ordered_semaphore.cpp b/src/sysc/scc/ordered_semaphore.cpp index f1578eeb..4b6b8078 100644 --- a/src/sysc/scc/ordered_semaphore.cpp +++ b/src/sysc/scc/ordered_semaphore.cpp @@ -102,7 +102,7 @@ auto ordered_semaphore::wait(unsigned priority) -> int { // lock (take) the semaphore, return -1 if not available auto ordered_semaphore::trywait() -> int { - if(in_use()) { + if(value == 0) { return -1; } --value;