root/drivers/staging/rtl8712/osdep_service.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. end_of_queue_search
  2. flush_signals_thread

   1 /* SPDX-License-Identifier: GPL-2.0 */
   2 /******************************************************************************
   3  *
   4  * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
   5  *
   6  * Modifications for inclusion into the Linux staging tree are
   7  * Copyright(c) 2010 Larry Finger. All rights reserved.
   8  *
   9  * Contact information:
  10  * WLAN FAE <wlanfae@realtek.com>
  11  * Larry Finger <Larry.Finger@lwfinger.net>
  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>      /* Necessary because we use the proc fs */
  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 

/* [<][>][^][v][top][bottom][index][help] */