projects
/
akaros.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
perf: Enable and disable counters in one step
[akaros.git]
/
kern
/
include
/
error.h
1
/* See COPYRIGHT for copyright information. */
2
3
#pragma once
4
5
#include <ros/errno.h>
6
7
typedef 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)