summaryrefslogtreecommitdiff
path: root/kern/mutex/mutex_adaptive_i.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-02-24 06:45:44 +0100
committerRichard Braun <rbraun@sceen.net>2018-02-24 06:48:21 +0100
commit7dcf6715ffb3cc2f00f6327b896d16f173a1b082 (patch)
tree210570e98e074d7abade0d22c64e05b9c02435ba /kern/mutex/mutex_adaptive_i.h
parentbe5b9d6ab9f7e7a81c367e4bb0823ba11f85940f (diff)
New errno.h standard header
Use standard errno codes. This change also adds strerror to string.h.
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;