From 7dcf6715ffb3cc2f00f6327b896d16f173a1b082 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Sat, 24 Feb 2018 06:45:44 +0100 Subject: New errno.h standard header Use standard errno codes. This change also adds strerror to string.h. --- kern/semaphore.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kern/semaphore.h') diff --git a/kern/semaphore.h b/kern/semaphore.h index afe1646b..640d6d6c 100644 --- a/kern/semaphore.h +++ b/kern/semaphore.h @@ -45,10 +45,10 @@ #define KERN_SEMAPHORE_H #include +#include #include #include -#include #define SEMAPHORE_VALUE_MAX 32768 @@ -71,7 +71,7 @@ semaphore_init(struct semaphore *semaphore, unsigned int value) * * This function may not sleep. * - * Return 0 on success, ERROR_AGAIN if the semaphore could not be decremented. + * Return 0 on success, EAGAIN if the semaphore could not be decremented. */ static inline int semaphore_trywait(struct semaphore *semaphore) @@ -81,7 +81,7 @@ semaphore_trywait(struct semaphore *semaphore) prev = semaphore_dec(semaphore); if (prev == 0) { - return ERROR_AGAIN; + return EAGAIN; } return 0; -- cgit v1.2.3