diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-12 22:35:07 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-12 22:35:07 +0100 |
commit | 9004213b4422e7a43c8ec8aac99d4ecc92553f20 (patch) | |
tree | 2e98e49e582494ce2f514fb388fa351637e5dffc /src/common/mutex.c | |
parent | 862b93742237ed959e9b8dc12a536880ea45d0cf (diff) | |
download | kogata-9004213b4422e7a43c8ec8aac99d4ecc92553f20.tar.gz kogata-9004213b4422e7a43c8ec8aac99d4ecc92553f20.zip |
Begin implementation of nullfs.
Diffstat (limited to 'src/common/mutex.c')
-rw-r--r-- | src/common/mutex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/mutex.c b/src/common/mutex.c index cda8049..b345ee5 100644 --- a/src/common/mutex.c +++ b/src/common/mutex.c @@ -13,11 +13,11 @@ void mutex_lock(uint32_t* mutex) { } } -int mutex_try_lock(uint32_t* mutex) { +bool mutex_try_lock(uint32_t* mutex) { if (atomic_exchange(mutex, MUTEX_LOCKED) == MUTEX_LOCKED) { - return 0; + return false; } - return 1; + return true; } void mutex_unlock(uint32_t* mutex) { |