summaryrefslogtreecommitdiff
path: root/src/thread.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/thread.c
parenta6c056ce150bd0339d5325edc18717b2d02a5b8d (diff)
error: remove and use standard errno codes instead
This change also adds strerror to string.h.
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/thread.c b/src/thread.c
index 0d63be8..70f036e 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -22,6 +22,7 @@
*/
#include <assert.h>
+#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
@@ -32,7 +33,6 @@
#include <lib/list.h>
#include "cpu.h"
-#include "error.h"
#include "panic.h"
#include "thread.h"
#include "timer.h"
@@ -675,7 +675,7 @@ thread_create(struct thread **threadp, thread_fn_t fn, void *arg,
thread = malloc(sizeof(*thread));
if (!thread) {
- return ERROR_NOMEM;
+ return ENOMEM;
}
if (stack_size < THREAD_STACK_MIN_SIZE) {
@@ -686,7 +686,7 @@ thread_create(struct thread **threadp, thread_fn_t fn, void *arg,
if (!stack) {
free(thread);
- return ERROR_NOMEM;
+ return ENOMEM;
}
thread_init(thread, fn, arg, name, stack, stack_size, priority);