From 33b9d606916f3847e0f754693ca49ce56175a330 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Thu, 3 Apr 2025 12:29:48 -0400 Subject: refactor include --- include/error.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 include/error.h (limited to 'include/error.h') diff --git a/include/error.h b/include/error.h new file mode 100644 index 0000000..b9265b4 --- /dev/null +++ b/include/error.h @@ -0,0 +1,30 @@ +/** + * @file errno.h + * + * @author Freya Murphy + * + * Error codes. + */ + +// public error codes +#define SUCCESS (0) +#define E_SUCCESS SUCCESS +#define E_FAILURE (-1) +#define E_BAD_PARAM (-2) +#define E_BAD_FD (-3) +#define E_NO_CHILDREN (-4) +#define E_NO_MEMORY (-5) +#define E_NOT_FOUND (-6) +#define E_NO_PROCS (-7) + +// internal error codes +#define E_EMPTY_QUEUE (-100) +#define E_NO_PCBS (-101) +#define E_NO_PTE (-102) +#define E_LOAD_LIMIT (-103) + +// exit status values +#define EXIT_SUCCESS (0) +#define EXIT_FAILURE (-1) +#define EXIT_KILLED (-101) +#define EXIT_BAD_SYSCALL (-102) -- cgit v1.2.3-freya