staging: wilc1000: clean up sleep wrapper
[linux-2.6/btrfs-unstable.git] / drivers / staging / wilc1000 / wilc_platform.h
blob2c66c3f3a2c5789126ca7b1cd0a914ed62dbd8c3
1 #ifndef __WILC_platfrom_H__
2 #define __WILC_platfrom_H__
4 /*!
5 * @file wilc_platform.h
6 * @brief platform specific file for Linux port
7 * @author syounan
8 * @sa wilc_oswrapper.h top level OS wrapper file
9 * @date 15 Dec 2010
10 * @version 1.0
14 /******************************************************************
15 * Feature support checks
16 *******************************************************************/
18 /* CONFIG_WILC_SEMAPHORE_FEATURE is implemented */
20 /* remove the following block when implementing its feature
21 * #ifdef CONFIG_WILC_SEMAPHORE_TIMEOUT
22 * #error This feature is not supported by this OS
23 #endif*/
26 /* CONFIG_WILC_TIMER_FEATURE is implemented */
28 /* CONFIG_WILC_TIMER_PERIODIC is implemented */
30 /* remove the following block when implementing its feature */
31 #ifdef CONFIG_WILC_ASSERTION_SUPPORT
32 #error This feature is not supported by this OS
33 #endif
35 /* CONFIG_WILC_FILE_OPERATIONS_FEATURE is implemented */
37 /* CONFIG_WILC_FILE_OPERATIONS_STRING_API is implemented */
39 /* remove the following block when implementing its feature */
40 #ifdef CONFIG_WILC_FILE_OPERATIONS_PATH_API
41 #error This feature is not supported by this OS
42 #endif
44 /* remove the following block when implementing its feature */
45 #ifdef CONFIG_WILC_EVENT_FEATURE
46 #error This feature is not supported by this OS
47 #endif
49 /* remove the following block when implementing its feature */
50 #ifdef CONFIG_WILC_EVENT_TIMEOUT
51 #error This feature is not supported by this OS
52 #endif
54 /* CONFIG_WILC_MATH_OPERATIONS_FEATURE is implemented */
56 /* CONFIG_WILC_EXTENDED_FILE_OPERATIONS is implemented */
58 /* CONFIG_WILC_EXTENDED_TIME_OPERATIONS is implemented */
60 /* remove the following block when implementing its feature */
61 #ifdef CONFIG_WILC_SOCKET_FEATURE
62 #error This feature is not supported by this OS
63 #endif
65 /******************************************************************
66 * OS specific includes
67 *******************************************************************/
68 #define _XOPEN_SOURCE 600
70 #include <linux/kthread.h>
71 #include <linux/semaphore.h>
72 #include <linux/module.h>
73 #include <linux/slab.h>
74 #include <linux/kernel.h>
75 #include <linux/delay.h>
76 #include <linux/types.h>
77 #include <linux/stat.h>
78 #include <linux/time.h>
79 #include <linux/version.h>
80 #include "linux/string.h"
81 /******************************************************************
82 * OS specific types
83 *******************************************************************/
85 typedef struct semaphore WILC_SemaphoreHandle;
87 typedef struct timer_list WILC_TimerHandle;
91 /* Message Queue type is a structure */
92 typedef struct __Message_struct {
93 void *pvBuffer;
94 WILC_Uint32 u32Length;
95 struct __Message_struct *pstrNext;
96 } Message;
98 typedef struct __MessageQueue_struct {
99 WILC_SemaphoreHandle hSem;
100 spinlock_t strCriticalSection;
101 WILC_Bool bExiting;
102 WILC_Uint32 u32ReceiversCount;
103 Message *pstrMessageList;
104 } WILC_MsgQueueHandle;
108 /*Time represented in 64 bit format*/
109 typedef time_t WILC_Time;
112 /*******************************************************************
113 * others
114 ********************************************************************/
116 /* Generic printf function */
117 #define __WILC_FILE__ __FILE__
118 #define __WILC_FUNCTION__ __FUNCTION__
119 #define __WILC_LINE__ __LINE__
120 #endif