]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/kernel/signal-common.h
[PARISC] ROUND_UP macro cleanup in arch/parisc
[linux-2.6-omap-h63xx.git] / arch / mips / kernel / signal-common.h
index 297dfcb97524fc65009d266c6fd53f52fc907658..c0faabd520103dec45ddce73aefaf8e27f775d35 100644 (file)
@@ -34,4 +34,13 @@ extern int install_sigtramp(unsigned int __user *tramp, unsigned int syscall);
 /* Check and clear pending FPU exceptions in saved CSR */
 extern int fpcsr_pending(unsigned int __user *fpcsr);
 
+/* Make sure we will not lose FPU ownership */
+#ifdef CONFIG_PREEMPT
+#define lock_fpu_owner()       preempt_disable()
+#define unlock_fpu_owner()     preempt_enable()
+#else
+#define lock_fpu_owner()       pagefault_disable()
+#define unlock_fpu_owner()     pagefault_enable()
+#endif
+
 #endif /* __SIGNAL_COMMON_H */