File: kernel-compat.h

package info (click to toggle)
radeontool 1.6.3-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 2,064 kB
  • ctags: 7,197
  • sloc: ansic: 15,599; sh: 11,054; makefile: 48
file content (40 lines) | stat: -rw-r--r-- 555 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

#include <string.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>

#include <endian.h>

#if __BYTE_ORDER == __LITTLE_ENDIAN
#define ATOM_BIG_ENDIAN 0
#else
#define ATOM_BIG_ENDIAN 1
#endif

#define GFP_KERNEL 1

static inline void *kzalloc(size_t size, int flags) {
	void *pt;

	pt = calloc(1, size);
	return pt;
}

static inline void kfree(void *pt)
{
	free(pt);
}


#define printk printf

#define KERN_INFO ""
#define KERN_DEBUG ""

#define true 1
#define false 0

#define le16_to_cpu(x) (x)
#define le32_to_cpu(x) (x)