xref: /nrf52832-nimble/rt-thread/components/dfs/filesystems/jffs2/kernel/linux/kernel.h (revision 104654410c56c573564690304ae786df310c91fc)
1 #ifndef __LINUX_KERNEL_H__
2 #define __LINUX_KERNEL_H__
3 //#include <cyg/infra/diag.h>
4 //#include <stdio.h>  //mod by prife @ 2011/11/20
5 #include "jffs2_config.h"
6 
7 #define jiffies 100
8 
9 #define ERR_PTR(err) ((void*)(err))
10 #define PTR_ERR(err) ((unsigned long)(err))
11 #define IS_ERR(err) ((unsigned long)err > (unsigned long)-1000L)
12 
13 #define CURRENT_TIME jffs2_get_timestamp()
14 
15 #define	KERN_EMERG              "<0>" // system is unusable
16 #define	KERN_ALERT              "<1>" // action must be taken immediately
17 #define	KERN_CRIT               "<2>" // critical conditions
18 #define	KERN_ERR                "<3>" // error conditions
19 #define	KERN_WARNING            "<4>" // warning conditions
20 #define	KERN_NOTICE             "<5>" // normal but significant condition
21 #define	KERN_INFO               "<6>" // informational
22 #define	KERN_DEBUG              "<7>" // debug-level messages
23 #define printk rt_kprintf//diag_printf  //mod by prife
24 
25 #ifndef min  //mod by prife
26 #define min(x,y) (x<y?x:y)
27 #endif
28 #ifndef max
29 #define max(x,y) (x<y?y:x)
30 #endif
31 #define min_t(t, x,y) ((t)x<(t)y?(t)x:(t)y)
32 
33 
34 #endif /* __LINUX_KERNEL_H__ */
35 
36 
37 
38 
39