My Kernel v0.1.0
error.h File Reference
#include <kernel/types.h>
#include <utils/compiler.h>
Include dependency graph for error.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IS_ERR(_x)   ((native_t)(_x) > ((u32) - E_TOTAL_COUNT))
 Check if an integer can be interpreted as an error.
 

Enumerations

enum  error {
  E_SUCCESS , E_PERM = 1 , E_NOENT = 2 , E_IO = 5 ,
  E_WOULD_BLOCK = 11 , E_NOMEM = 12 , E_BUSY = 16 , E_EXIST = 17 ,
  E_NODEV = 19 , E_NOT_DIRECTORY = 20 , E_IS_DIRECTORY = 21 , E_INVAL = 22 ,
  E_NFILE = 23 , E_MFILE = 24 , E_SEEK_PIPE = 29 , E_READ_ONLY_FS = 30 ,
  E_NAME_TOO_LONG = 36 , E_NOT_IMPLEMENTED = 38 , E_BAD_FD = 81 , E_NOT_SOCKET = 88 ,
  E_DEST_ADDR_REQUIRED = 89 , E_MSG_SIZE = 90 , E_PROTOTYPE = 91 , E_NO_PROTO_OPT = 92 ,
  E_PROTO_NOT_SUPPORTED = 93 , E_SOCK_T_NOT_SUPPORTED = 94 , E_NOT_SUPPORTED = 95 , E_PF_NOT_SUPPORTED = 96 ,
  E_AF_NOT_SUPPORTED = 97 , E_ADDR_IN_USE = 98 , E_ADDR_NOT_AVAILABLE = 99 , E_NET_DOWN = 100 ,
  E_NET_UNREACHABLE = 101 , E_NO_BUFFER_SPACE = 105 , E_IS_CONNECTED = 106 , E_NOT_CONNECTED = 107 ,
  E_TOTAL_COUNT
}
 All the error types used in ths project. More...
 

Functions

static ALWAYS_INLINE void * PTR_ERR (error_t err)
 Construct a pointer containing info about an error.
 
static ALWAYS_INLINE error_t ERR_FROM_PTR (const void *ptr)
 Extract the error value contained inside a pointer

 
const char * err_to_str (error_t)
 Retrieve the string description of an error code.