Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lnet / include / libcfs / linux / portals_utils.h
1 #ifndef __LIBCFS_LINUX_PORTALS_UTILS_H__
2 #define __LIBCFS_LINUX_PORTALS_UTILS_H__
3
4 #ifndef __LIBCFS_PORTALS_UTILS_H__
5 #error Do not #include this file directly. #include <libcfs/portals_utils.h> instead
6 #endif
7
8 #ifdef __KERNEL__
9 #include <linux/proc_fs.h>
10 #include <linux/init.h>
11 #include <linux/kernel.h>
12 #include <linux/sched.h>
13 #include <linux/wait.h>
14 #include <linux/smp_lock.h>
15 #include <linux/poll.h>
16 #include <linux/random.h>
17
18 #include <asm/unistd.h>
19 #include <asm/semaphore.h>
20
21 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
22 # include <linux/tqueue.h>
23 #else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) */
24 # include <linux/workqueue.h>
25 #endif
26 #include <libcfs/linux/linux-mem.h>
27 #include <libcfs/linux/linux-prim.h>
28 #else /* !__KERNEL__ */
29
30 #include <endian.h>
31 #include <libcfs/list.h>
32
33 #ifdef HAVE_LINUX_VERSION_H
34 # include <linux/version.h>
35
36 # if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
37 #  define BUG()                            /* workaround for module.h includes */
38 #  include <linux/module.h>
39 # endif
40 #endif /* !HAVE_LINUX_VERSION_H */
41
42 #ifndef __CYGWIN__
43 # include <sys/syscall.h>
44 #else /* __CYGWIN__ */
45 # include <windows.h>
46 # include <windef.h>
47 # include <netinet/in.h>
48 #endif /* __CYGWIN__ */
49
50 #endif /* !__KERNEL__ */
51 #endif