summaryrefslogtreecommitdiff
path: root/kern/spinlock_i.h
diff options
context:
space:
mode:
Diffstat (limited to 'kern/spinlock_i.h')
-rw-r--r--kern/spinlock_i.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/kern/spinlock_i.h b/kern/spinlock_i.h
index 113b556f..a54a5e3b 100644
--- a/kern/spinlock_i.h
+++ b/kern/spinlock_i.h
@@ -19,11 +19,11 @@
#define KERN_SPINLOCK_I_H
#include <assert.h>
+#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <kern/atomic.h>
-#include <kern/error.h>
#include <kern/macros.h>
#include <kern/spinlock_types.h>
#include <kern/thread.h>
@@ -72,7 +72,7 @@ spinlock_lock_fast(struct spinlock *lock)
prev = atomic_cas_acquire(&lock->value, SPINLOCK_UNLOCKED, SPINLOCK_LOCKED);
if (unlikely(prev != SPINLOCK_UNLOCKED)) {
- return ERROR_BUSY;
+ return EBUSY;
}
spinlock_own(lock);
@@ -88,7 +88,7 @@ spinlock_unlock_fast(struct spinlock *lock)
prev = atomic_cas_release(&lock->value, SPINLOCK_LOCKED, SPINLOCK_UNLOCKED);
if (unlikely(prev != SPINLOCK_LOCKED)) {
- return ERROR_BUSY;
+ return EBUSY;
}
return 0;