Daniel Machon | c915aad | 2015-08-08 20:00:07 +0200 | [diff] [blame] | 1 | #ifndef __WILC_platform_H__ |
| 2 | #define __WILC_platform_H__ |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 3 | |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 4 | #include <linux/kthread.h> |
| 5 | #include <linux/semaphore.h> |
| 6 | #include <linux/module.h> |
| 7 | #include <linux/slab.h> |
| 8 | #include <linux/kernel.h> |
| 9 | #include <linux/delay.h> |
| 10 | #include <linux/types.h> |
| 11 | #include <linux/stat.h> |
| 12 | #include <linux/time.h> |
| 13 | #include <linux/version.h> |
| 14 | #include "linux/string.h" |
| 15 | /****************************************************************** |
| 16 | * OS specific types |
| 17 | *******************************************************************/ |
| 18 | |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 19 | /* Message Queue type is a structure */ |
| 20 | typedef struct __Message_struct { |
| 21 | void *pvBuffer; |
Chaehyun Lim | 4e4467f | 2015-06-11 14:35:55 +0900 | [diff] [blame] | 22 | u32 u32Length; |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 23 | struct __Message_struct *pstrNext; |
| 24 | } Message; |
| 25 | |
| 26 | typedef struct __MessageQueue_struct { |
Arnd Bergmann | 83383ea | 2015-06-01 21:06:43 +0200 | [diff] [blame] | 27 | struct semaphore hSem; |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 28 | spinlock_t strCriticalSection; |
Dean Lee | 72ed4dc | 2015-06-12 14:11:44 +0900 | [diff] [blame] | 29 | bool bExiting; |
Chaehyun Lim | 4e4467f | 2015-06-11 14:35:55 +0900 | [diff] [blame] | 30 | u32 u32ReceiversCount; |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 31 | Message *pstrMessageList; |
| 32 | } WILC_MsgQueueHandle; |
| 33 | |
| 34 | |
| 35 | |
| 36 | /*Time represented in 64 bit format*/ |
| 37 | typedef time_t WILC_Time; |
| 38 | |
| 39 | |
| 40 | /******************************************************************* |
| 41 | * others |
| 42 | ********************************************************************/ |
| 43 | |
| 44 | /* Generic printf function */ |
| 45 | #define __WILC_FILE__ __FILE__ |
Chaehyun Lim | 60cb1e2 | 2015-06-19 09:06:28 +0900 | [diff] [blame] | 46 | #define __WILC_FUNCTION__ __func__ |
Johnny Kim | c5c77ba | 2015-05-11 14:30:56 +0900 | [diff] [blame] | 47 | #define __WILC_LINE__ __LINE__ |
| 48 | #endif |