diff options
author | Richard Braun <rbraun@sceen.net> | 2018-02-24 06:45:44 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2018-02-24 06:48:21 +0100 |
commit | 7dcf6715ffb3cc2f00f6327b896d16f173a1b082 (patch) | |
tree | 210570e98e074d7abade0d22c64e05b9c02435ba /kern/semaphore.h | |
parent | be5b9d6ab9f7e7a81c367e4bb0823ba11f85940f (diff) |
New errno.h standard header
Use standard errno codes. This change also adds strerror to string.h.
Diffstat (limited to 'kern/semaphore.h')
-rw-r--r-- | kern/semaphore.h | 6 |
1 files changed, 3 insertions, 3 deletions
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 <assert.h> +#include <errno.h> #include <stdint.h> #include <kern/atomic.h> -#include <kern/error.h> #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; |