akaros/kern/include/error.h
<<
>>
Prefs
   1/* See COPYRIGHT for copyright information. */
   2
   3#pragma once
   4
   5#include <ros/errno.h>
   6
   7typedef int error_t;
   8
   9#define MAX_ERRNO               4095
  10
  11#define ERR_PTR(err)  ((void *)((intptr_t)(err)))
  12#define PTR_ERR(ptr)  ((intptr_t)(ptr))
  13#define IS_ERR(ptr)   (-(intptr_t)(ptr) <= MAX_ERRNO)
  14#define IS_ERR_OR_NULL(ptr) (!(ptr) || IS_ERR(ptr))
  15