]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/staging/wilc1000/wilc_msgqueue.h
Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[karo-tx-linux.git] / drivers / staging / wilc1000 / wilc_msgqueue.h
1 #ifndef __WILC_MSG_QUEUE_H__
2 #define __WILC_MSG_QUEUE_H__
3
4 #include <linux/semaphore.h>
5 #include <linux/list.h>
6
7 struct message {
8         void *buf;
9         u32 len;
10         struct list_head list;
11 };
12
13 struct message_queue {
14         struct semaphore sem;
15         spinlock_t lock;
16         bool exiting;
17         u32 recv_count;
18         struct list_head msg_list;
19 };
20
21 int wilc_mq_create(struct message_queue *mq);
22 int wilc_mq_send(struct message_queue *mq,
23                  const void *send_buf, u32 send_buf_size);
24 int wilc_mq_recv(struct message_queue *mq,
25                  void *recv_buf, u32 recv_buf_size, u32 *recv_len);
26 int wilc_mq_destroy(struct message_queue *mq);
27
28 #endif