blob: 1e56973f2f933c4f96a3df699ff21ee5a4577076 [file] [log] [blame]
Daniel Machonc915aad2015-08-08 20:00:07 +02001#ifndef __WILC_platform_H__
2#define __WILC_platform_H__
Johnny Kimc5c77ba2015-05-11 14:30:56 +09003
Johnny Kimc5c77ba2015-05-11 14:30:56 +09004#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 Kimc5c77ba2015-05-11 14:30:56 +090019/* Message Queue type is a structure */
20typedef struct __Message_struct {
21 void *pvBuffer;
Chaehyun Lim4e4467f2015-06-11 14:35:55 +090022 u32 u32Length;
Johnny Kimc5c77ba2015-05-11 14:30:56 +090023 struct __Message_struct *pstrNext;
24} Message;
25
26typedef struct __MessageQueue_struct {
Arnd Bergmann83383ea2015-06-01 21:06:43 +020027 struct semaphore hSem;
Johnny Kimc5c77ba2015-05-11 14:30:56 +090028 spinlock_t strCriticalSection;
Dean Lee72ed4dc2015-06-12 14:11:44 +090029 bool bExiting;
Chaehyun Lim4e4467f2015-06-11 14:35:55 +090030 u32 u32ReceiversCount;
Johnny Kimc5c77ba2015-05-11 14:30:56 +090031 Message *pstrMessageList;
32} WILC_MsgQueueHandle;
33
34
35
36/*Time represented in 64 bit format*/
37typedef time_t WILC_Time;
38
39
40/*******************************************************************
41 * others
42 ********************************************************************/
43
44/* Generic printf function */
45#define __WILC_FILE__ __FILE__
Chaehyun Lim60cb1e22015-06-19 09:06:28 +090046#define __WILC_FUNCTION__ __func__
Johnny Kimc5c77ba2015-05-11 14:30:56 +090047#define __WILC_LINE__ __LINE__
48#endif