diff options
Diffstat (limited to 'kern/mutex/mutex_plain_i.h')
-rw-r--r-- | kern/mutex/mutex_plain_i.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kern/mutex/mutex_plain_i.h b/kern/mutex/mutex_plain_i.h index 0c58174..d28fd92 100644 --- a/kern/mutex/mutex_plain_i.h +++ b/kern/mutex/mutex_plain_i.h @@ -24,10 +24,10 @@ #endif #include <assert.h> +#include <errno.h> #include <stdint.h> #include <kern/atomic.h> -#include <kern/error.h> #include <kern/init.h> #include <kern/mutex_types.h> @@ -52,7 +52,7 @@ mutex_plain_lock_fast(struct mutex *mutex) state = atomic_cas_acquire(&mutex->state, MUTEX_UNLOCKED, MUTEX_LOCKED); if (unlikely(state != MUTEX_UNLOCKED)) { - return ERROR_BUSY; + return EBUSY; } return 0; @@ -66,7 +66,7 @@ mutex_plain_unlock_fast(struct mutex *mutex) state = atomic_swap_release(&mutex->state, MUTEX_UNLOCKED); if (unlikely(state == MUTEX_CONTENDED)) { - return ERROR_BUSY; + return EBUSY; } return 0; |