summaryrefslogtreecommitdiff
path: root/kern/mutex/mutex_adaptive_i.h
diff options
context:
space:
mode:
Diffstat (limited to 'kern/mutex/mutex_adaptive_i.h')
-rw-r--r--kern/mutex/mutex_adaptive_i.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/kern/mutex/mutex_adaptive_i.h b/kern/mutex/mutex_adaptive_i.h
index ce2ac4f2..05e97640 100644
--- a/kern/mutex/mutex_adaptive_i.h
+++ b/kern/mutex/mutex_adaptive_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/macros.h>
#include <kern/mutex_types.h>
@@ -58,7 +58,7 @@ mutex_adaptive_lock_fast(struct mutex *mutex)
owner = atomic_cas_acquire(&mutex->owner, 0, (uintptr_t)thread_self());
if (unlikely(owner != 0)) {
- return ERROR_BUSY;
+ return EBUSY;
}
return 0;
@@ -72,7 +72,7 @@ mutex_adaptive_unlock_fast(struct mutex *mutex)
owner = atomic_cas_release(&mutex->owner, (uintptr_t)thread_self(), 0);
if (unlikely(owner & MUTEX_ADAPTIVE_CONTENDED)) {
- return ERROR_BUSY;
+ return EBUSY;
}
return 0;