mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-29 07:33:39 +00:00
rtl8188eu: Use CONFIG_PREEMPT_RT to select raw spin lock form for real-time kernels
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
6c792da5b8
commit
07152ef10d
1 changed files with 22 additions and 0 deletions
|
@ -125,7 +125,11 @@
|
||||||
|
|
||||||
|
|
||||||
typedef struct semaphore _sema;
|
typedef struct semaphore _sema;
|
||||||
|
#ifdef CONFIG_PREEMPT_RT
|
||||||
|
typedef raw_spinlock_t _lock;
|
||||||
|
#else
|
||||||
typedef spinlock_t _lock;
|
typedef spinlock_t _lock;
|
||||||
|
#endif
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37))
|
||||||
typedef struct mutex _mutex;
|
typedef struct mutex _mutex;
|
||||||
#else
|
#else
|
||||||
|
@ -202,6 +206,23 @@ __inline static _list *get_list_head(_queue *queue)
|
||||||
((type *)((char *)(ptr)-(SIZE_T)(&((type *)0)->member)))
|
((type *)((char *)(ptr)-(SIZE_T)(&((type *)0)->member)))
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef CONFIG_PREEMPT_RT
|
||||||
|
__inline static void _enter_critical(_lock *plock, unsigned long *pirqL)
|
||||||
|
{
|
||||||
|
raw_spin_lock_irqsave(plock, *pirqL);
|
||||||
|
}
|
||||||
|
|
||||||
|
__inline static void _exit_critical(_lock *plock, unsigned long *pirqL)
|
||||||
|
{
|
||||||
|
raw_spin_unlock_irqrestore(plock, *pirqL);
|
||||||
|
}
|
||||||
|
|
||||||
|
__inline static void _enter_critical_ex(_lock *plock, unsigned long *pirqL)
|
||||||
|
{
|
||||||
|
raw_spin_lock_irqsave(plock, *pirqL);
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
__inline static void _enter_critical(_lock *plock, unsigned long *pirqL)
|
__inline static void _enter_critical(_lock *plock, unsigned long *pirqL)
|
||||||
{
|
{
|
||||||
spin_lock_irqsave(plock, *pirqL);
|
spin_lock_irqsave(plock, *pirqL);
|
||||||
|
@ -217,6 +238,7 @@ __inline static void _enter_critical_ex(_lock *plock, unsigned long *pirqL)
|
||||||
spin_lock_irqsave(plock, *pirqL);
|
spin_lock_irqsave(plock, *pirqL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
__inline static void _exit_critical_ex(_lock *plock, unsigned long *pirqL)
|
__inline static void _exit_critical_ex(_lock *plock, unsigned long *pirqL)
|
||||||
{
|
{
|
||||||
spin_unlock_irqrestore(plock, *pirqL);
|
spin_unlock_irqrestore(plock, *pirqL);
|
||||||
|
|
Loading…
Reference in a new issue