Fixed up ivy annotations on the new structure supporting page_coloring.
[akaros.git] / kern / include / ros / error.h
1 /* See COPYRIGHT for copyright information. */
2
3 #ifndef ROS_INC_ERROR_H
4 #define ROS_INC_ERROR_H
5
6 #define DECLARE_ERROR_CODE(e, s)
7
8 typedef enum {
9         ESUCCESS = 0,            // Success
10         EFAIL,                   // Generic Failure
11         EPERM,                   // Wrong permissions
12         EDEADLOCK,               // Would cause deadlock
13         EBUSY,                   // Currently busy, try again later
14         ENOMEM,                  // No memory available
15         EINVAL,                  // Invalid arguments
16         EFAULT,                  // Segmentation fault
17         EBADENV,                 // Bad environment 
18         ENOFREEENV,              // No free environment
19         EUNSPECIFIED,            // Unspecified
20         EMORON,                  // Moron
21         NUMERRORS,               // Total number of error codes
22 } error_t;
23
24 /* 
25  * The special format for printk %e takes an integer 
26  * error code and prints a string describing the error.
27  * The integer may be positive or negative,
28  * so that -ENOMEM and ENOMEM are equivalent.
29  */
30
31 static const char *NTS const error_string[NUMERRORS] =
32 {
33         "Success",
34         "Generic Failure",
35         "Wrong permissions",
36         "Would cause deadlock",
37         "Currently busy, try again later",
38         "No memory available",
39         "Invalid arguments",
40         "Segmentation fault",
41         "Bad environment",
42         "No free environment",
43         "You are a moron",
44         "Unspecified",
45 };
46
47 #endif  // !ROS_INC_ERROR_H */