This source file includes following definitions.
- end_of_queue_search
- flush_signals_thread
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #ifndef __OSDEP_SERVICE_H_
15 #define __OSDEP_SERVICE_H_
16
17 #define _SUCCESS 1
18 #define _FAIL 0
19
20 #include <linux/spinlock.h>
21
22 #include <linux/interrupt.h>
23 #include <linux/semaphore.h>
24 #include <linux/sched/signal.h>
25 #include <linux/sem.h>
26 #include <linux/netdevice.h>
27 #include <linux/etherdevice.h>
28 #include <net/iw_handler.h>
29 #include <linux/proc_fs.h>
30
31 #include "basic_types.h"
32
33 struct __queue {
34 struct list_head queue;
35 spinlock_t lock;
36 };
37
38 #define _pkt struct sk_buff
39 #define _buffer unsigned char
40 #define thread_exit() complete_and_exit(NULL, 0)
41
42 #define _init_queue(pqueue) \
43 do { \
44 INIT_LIST_HEAD(&((pqueue)->queue)); \
45 spin_lock_init(&((pqueue)->lock)); \
46 } while (0)
47
48 static inline u32 end_of_queue_search(struct list_head *head,
49 struct list_head *plist)
50 {
51 return (head == plist);
52 }
53
54 static inline void flush_signals_thread(void)
55 {
56 if (signal_pending(current))
57 flush_signals(current);
58 }
59
60 #endif
61