summaryrefslogtreecommitdiff
path: root/kern/mutex/mutex_plain_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_plain_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_plain_i.h')
-rw-r--r--kern/mutex/mutex_plain_i.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/kern/mutex/mutex_plain_i.h b/kern/mutex/mutex_plain_i.h
index 0c58174b..d28fd92b 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;