Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /******************************************************************************
0003  *
0004  * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
0005  *
0006  * Modifications for inclusion into the Linux staging tree are
0007  * Copyright(c) 2010 Larry Finger. All rights reserved.
0008  *
0009  * Contact information:
0010  * WLAN FAE <wlanfae@realtek.com>
0011  * Larry Finger <Larry.Finger@lwfinger.net>
0012  *
0013  ******************************************************************************/
0014 #ifndef __OSDEP_SERVICE_H_
0015 #define __OSDEP_SERVICE_H_
0016 
0017 #define _SUCCESS    1
0018 #define _FAIL       0
0019 
0020 #include <linux/spinlock.h>
0021 
0022 #include <linux/interrupt.h>
0023 #include <linux/semaphore.h>
0024 #include <linux/sched/signal.h>
0025 #include <linux/sem.h>
0026 #include <linux/netdevice.h>
0027 #include <linux/etherdevice.h>
0028 #include <net/iw_handler.h>
0029 #include <linux/proc_fs.h>      /* Necessary because we use the proc fs */
0030 
0031 #include "basic_types.h"
0032 
0033 struct  __queue {
0034     struct  list_head   queue;
0035     spinlock_t lock;
0036 };
0037 
0038 #define _pkt struct sk_buff
0039 #define _buffer unsigned char
0040 
0041 #define _init_queue(pqueue)             \
0042     do {                        \
0043         INIT_LIST_HEAD(&((pqueue)->queue)); \
0044         spin_lock_init(&((pqueue)->lock));  \
0045     } while (0)
0046 
0047 static inline u32 end_of_queue_search(struct list_head *head,
0048                       struct list_head *plist)
0049 {
0050     return (head == plist);
0051 }
0052 
0053 static inline void flush_signals_thread(void)
0054 {
0055     if (signal_pending(current))
0056         flush_signals(current);
0057 }
0058 
0059 #endif
0060