summaryrefslogtreecommitdiff
path: root/src/mutex.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-01-05 01:58:08 +0100
committerRichard Braun <rbraun@sceen.net>2018-01-05 01:58:26 +0100
commit62d27d872769ebcd79a931fa07b1128576e65e65 (patch)
tree0a99e87809c9055dcdcfbd9ed4bec1a72534ced9 /src/mutex.c
parenta6c056ce150bd0339d5325edc18717b2d02a5b8d (diff)
error: remove and use standard errno codes instead
This change also adds strerror to string.h.
Diffstat (limited to 'src/mutex.c')
-rw-r--r--src/mutex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mutex.c b/src/mutex.c
index d70bd82..336f192 100644
--- a/src/mutex.c
+++ b/src/mutex.c
@@ -21,13 +21,13 @@
*/
#include <assert.h>
+#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <lib/list.h>
#include <lib/macros.h>
-#include "error.h"
#include "mutex.h"
#include "thread.h"
@@ -122,7 +122,7 @@ mutex_trylock(struct mutex *mutex)
thread_preempt_disable();
if (mutex->locked) {
- error = ERROR_BUSY;
+ error = EBUSY;
} else {
error = 0;
mutex_set_owner(mutex, thread_self());