]> pd.if.org Git - liblfds/blob - liblfds/liblfds7.1.0/liblfds710/inc/liblfds710/lfds710_porting_abstraction_layer_operating_system.h
Initial import (all versions, including the new 7.1.0)
[liblfds] / liblfds / liblfds7.1.0 / liblfds710 / inc / liblfds710 / lfds710_porting_abstraction_layer_operating_system.h
1 /****************************************************************************/
2 #if( defined _WIN32 && !defined KERNEL_MODE )
3
4   #ifdef LFDS710_PAL_OPERATING_SYSTEM
5     #error More than one porting abstraction layer matches the current platform in "lfds710_porting_abstraction_layer_operating_system.h".
6   #endif
7
8   #define LFDS710_PAL_OPERATING_SYSTEM
9
10   #include <assert.h>
11
12   #define LFDS710_PAL_OS_STRING             "Windows"
13   #define LFDS710_PAL_ASSERT( expression )  if( !(expression) ) LFDS710_MISC_DELIBERATELY_CRASH;
14
15 #endif
16
17
18
19
20
21 /****************************************************************************/
22 #if( defined _WIN32 && defined KERNEL_MODE )
23
24   #ifdef LFDS710_PAL_OPERATING_SYSTEM
25     #error More than one porting abstraction layer matches the current platform in "lfds710_porting_abstraction_layer_operating_system.h".
26   #endif
27
28   #define LFDS710_PAL_OPERATING_SYSTEM
29
30   #include <assert.h>
31   #include <wdm.h>
32
33   #define LFDS710_PAL_OS_STRING             "Windows"
34   #define LFDS710_PAL_ASSERT( expression )  if( !(expression) ) LFDS710_MISC_DELIBERATELY_CRASH;
35
36 #endif
37
38
39
40
41
42 /****************************************************************************/
43 #if( defined __linux__ && !defined KERNEL_MODE )
44
45   #ifdef LFDS710_PAL_OPERATING_SYSTEM
46     #error More than one porting abstraction layer matches the current platform in "lfds710_porting_abstraction_layer_operating_system.h".
47   #endif
48
49   #define LFDS710_PAL_OPERATING_SYSTEM
50
51   #define LFDS710_PAL_OS_STRING             "Linux"
52   #define LFDS710_PAL_ASSERT( expression )  if( !(expression) ) LFDS710_MISC_DELIBERATELY_CRASH;
53
54 #endif
55
56
57
58
59
60 /****************************************************************************/
61 #if( defined __linux__ && defined KERNEL_MODE )
62
63   #ifdef LFDS710_PAL_OPERATING_SYSTEM
64     #error More than one porting abstraction layer matches the current platform in "lfds710_porting_abstraction_layer_operating_system.h".
65   #endif
66
67   #define LFDS710_PAL_OPERATING_SYSTEM
68
69   #include <linux/module.h>
70
71   #define LFDS710_PAL_OS_STRING             "Linux"
72   #define LFDS710_PAL_ASSERT( expression )  BUG_ON( expression )
73
74 #endif
75
76
77
78
79
80 /****************************************************************************/
81 #if( !defined LFDS710_PAL_OPERATING_SYSTEM )
82
83   #error No matching porting abstraction layer in lfds710_porting_abstraction_layer_operating_system.h
84
85 #endif
86