Fix unnecessary switching of CR3 registers in syscall handling.
[akaros.git] / include / error.h
1 /* See COPYRIGHT for copyright information. */
2
3 #ifndef ROS_INC_ERROR_H
4 #define ROS_INC_ERROR_H
5
6 typedef enum {
7         E_DEADLOCK      =       -3,
8         E_BUSY          =       -2,
9         E_FAIL          =       -1,
10         E_SUCCESS       =       0,
11 } error_t;
12
13 // Kernel error codes -- keep in sync with list in lib/printfmt.c.
14 #define E_UNSPECIFIED   1       // Unspecified or unknown problem
15 #define E_BAD_ENV               2       // Environment doesn't exist or otherwise
16                                                         // cannot be used in requested action
17 #define E_INVAL                 3       // Invalid parameter
18 #define E_NO_MEM                4       // Request failed due to memory shortage
19 #define E_NO_FREE_ENV   5       // Attempt to create a new environment beyond
20                                                         // the maximum allowed
21 #define E_FAULT                 6       // Memory fault
22 #define MAXERROR                6
23
24 #endif  // !ROS_INC_ERROR_H */