|
@@ -57,6 +57,8 @@
|
|
|
#include <linux/byteorder/generic.h>
|
|
|
#endif
|
|
|
|
|
|
+#include <linux/rcupdate.h>
|
|
|
+
|
|
|
typedef wait_queue_head_t __qdf_wait_queue_head_t;
|
|
|
|
|
|
/* Generic compiler-dependent macros if defined by the OS */
|
|
@@ -500,4 +502,19 @@ static inline int __qdf_get_smp_processor_id(void)
|
|
|
{
|
|
|
return smp_processor_id();
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * __qdf_in_atomic: Check whether current thread running in atomic context
|
|
|
+ *
|
|
|
+ * Return: true if current thread is running in the atomic context
|
|
|
+ * else it will be return false.
|
|
|
+ */
|
|
|
+static inline bool __qdf_in_atomic(void)
|
|
|
+{
|
|
|
+ if (in_interrupt() || !preemptible() || rcu_preempt_depth())
|
|
|
+ return true;
|
|
|
+
|
|
|
+ return false;
|
|
|
+}
|
|
|
+
|
|
|
#endif /*_I_QDF_UTIL_H*/
|