summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrakash Surya <[email protected]>2012-08-24 10:42:12 -0700
committerBrian Behlendorf <[email protected]>2012-08-24 15:18:38 -0700
commit45324c7c419b70397cae31b9f2b90ca0a97c9d77 (patch)
tree33099e4b128e9d9924d15220d976f54cce7338aa
parent08850eddcb128cbdca584255324d71dfee2ccba9 (diff)
Add kpreempt_[dis|en]able macros in <sys/disp.h>
To support preempt enabled kernels in ZFS on Linux, there are a couple places where the ZFS code needs to disable interrupts. This change adds the Solaris preempt functions and maps them to the equivalent ZFS functions, allowing the ZFS to make use of them. Signed-off-by: Prakash Surya <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #98
-rw-r--r--include/sys/disp.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sys/disp.h b/include/sys/disp.h
index a0a1b0957..2a4b4ded8 100644
--- a/include/sys/disp.h
+++ b/include/sys/disp.h
@@ -25,4 +25,9 @@
#ifndef _SPL_DISP_H
#define _SPL_DISP_H
+#include <linux/preempt.h>
+
+#define kpreempt_disable() preempt_disable()
+#define kpreempt_enable() preempt_enable()
+
#endif /* SPL_DISP_H */