Subversion Repositories Kolibri OS

Rev

Rev 4103 | Rev 5270 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4103 Rev 5056
Line 1... Line 1...
1
#ifndef _LINUX_ERR_H
1
#ifndef _LINUX_ERR_H
2
#define _LINUX_ERR_H
2
#define _LINUX_ERR_H
Line 3... Line 3...
3
 
3
 
-
 
4
#include 
Line 4... Line 5...
4
#include 
5
#include 
Line 5... Line 6...
5
 
6
 
6
#include 
7
#include 
7
 
8
 
8
/*
9
/*
9
 * Kernel pointers have redundant information, so we can use a
10
 * Kernel pointers have redundant information, so we can use a
10
 * scheme where we can return either an error code or a dentry
11
 * scheme where we can return either an error code or a normal
11
 * pointer with the same return value.
12
 * pointer with the same return value.
12
 *
13
 *
Line 27... Line 28...
27
static inline long __must_check PTR_ERR(__force const void *ptr)
28
static inline long __must_check PTR_ERR(__force const void *ptr)
28
{
29
{
29
	return (long) ptr;
30
	return (long) ptr;
30
}
31
}
Line 31... Line 32...
31
 
32
 
32
static inline long __must_check IS_ERR(__force const void *ptr)
33
static inline bool __must_check IS_ERR(__force const void *ptr)
33
{
34
{
34
	return IS_ERR_VALUE((unsigned long)ptr);
35
	return IS_ERR_VALUE((unsigned long)ptr);
Line 35... Line 36...
35
}
36
}
36
 
37
 
37
static inline long __must_check IS_ERR_OR_NULL(__force const void *ptr)
38
static inline bool __must_check IS_ERR_OR_NULL(__force const void *ptr)
38
{
39
{
Line 39... Line 40...
39
	return !ptr || IS_ERR_VALUE((unsigned long)ptr);
40
	return !ptr || IS_ERR_VALUE((unsigned long)ptr);