XenevaOS
Loading...
Searching...
No Matches
Macros
err.h File Reference
#include <linux/kernel.h>
#include <linux/fs.h>
Include dependency graph for err.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ERR_PTR(err)   ((void*)(long)(err))
 
#define PTR_ERR(ptr)   ((long)(ptr))
 
#define IS_ERR(ptr)   IS_ERR_VALUE((unsigned long)(ptr))
 
#define IS_ERR_OR_NULL(ptr)   (!(ptr) || IS_ERR(ptr))
 
#define IS_ERR_OR_ZERO(ptr)   (IS_ERR(ptr) ? PTR_ERR(ptr) : 0)
 
#define ERR_CAST(ptr)   ((void*)(ptr))
 
#define PTR_ERR_OR_NULL(ptr)   (IS_ERR(ptr) ? PTR_ERR(ptr) : 0)
 

Macro Definition Documentation

◆ ERR_CAST

#define ERR_CAST (   ptr)    ((void*)(ptr))

◆ ERR_PTR

#define ERR_PTR (   err)    ((void*)(long)(err))

◆ IS_ERR

#define IS_ERR (   ptr)    IS_ERR_VALUE((unsigned long)(ptr))

◆ IS_ERR_OR_NULL

#define IS_ERR_OR_NULL (   ptr)    (!(ptr) || IS_ERR(ptr))

◆ IS_ERR_OR_ZERO

#define IS_ERR_OR_ZERO (   ptr)    (IS_ERR(ptr) ? PTR_ERR(ptr) : 0)

◆ PTR_ERR

#define PTR_ERR (   ptr)    ((long)(ptr))

◆ PTR_ERR_OR_NULL

#define PTR_ERR_OR_NULL (   ptr)    (IS_ERR(ptr) ? PTR_ERR(ptr) : 0)