Changeset e994898 in mainline


Ignore:
Timestamp:
2023-02-09T17:42:22Z (22 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
daadfa6
Parents:
4c78104
Message:

Fix an oops

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/synch/mutex.c

    r4c78104 re994898  
    6666bool mutex_locked(mutex_t *mtx)
    6767{
    68         bool success = semaphore_trydown(&mtx->sem);
    69         if (success) {
     68        errno_t rc = semaphore_trydown(&mtx->sem);
     69        if (rc == EOK) {
    7070                semaphore_up(&mtx->sem);
    7171        }
    72         return !success;
     72        return rc != EOK;
    7373}
    7474
Note: See TracChangeset for help on using the changeset viewer.