diff options
Diffstat (limited to 'kern/mutex.h')
-rw-r--r-- | kern/mutex.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kern/mutex.h b/kern/mutex.h index 5ea8061e..64efa350 100644 --- a/kern/mutex.h +++ b/kern/mutex.h @@ -24,6 +24,7 @@ #define _KERN_MUTEX_H #include <kern/assert.h> +#include <kern/error.h> #include <kern/list.h> #include <kern/mutex_i.h> #include <kern/mutex_types.h> @@ -41,9 +42,6 @@ mutex_init(struct mutex *mutex) #define mutex_assert_locked(mutex) assert((mutex)->state != MUTEX_UNLOCKED) -/* - * Return 0 on success, 1 if busy. - */ static inline int mutex_trylock(struct mutex *mutex) { @@ -55,7 +53,7 @@ mutex_trylock(struct mutex *mutex) return 0; } - return 1; + return ERROR_BUSY; } static inline void |