[PATCH -rt 4/5] use migrate_disable for __local_begin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Peter Zijlstra <[email protected]>
---
 include/asm-i386/local.h   |    7 ++++---
 include/asm-x86_64/local.h |    7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

Index: linux-2.6/include/asm-i386/local.h
===================================================================
--- linux-2.6.orig/include/asm-i386/local.h
+++ linux-2.6/include/asm-i386/local.h
@@ -197,11 +197,12 @@ static __inline__ long local_sub_return(
 #define __local_begin(__flags)					\
 {								\
 	(__flags) = 0;						\
-	preempt_disable();					\
+	migrate_disable();					\
 }
 
-static inline void __local_end(unsigned long flags) {
-	preempt_enable();
+static inline void __local_end(unsigned long flags)
+{
+	migrate_enable();
 }
 
 /* On x86, these are no better than the atomic variants. */
Index: linux-2.6/include/asm-x86_64/local.h
===================================================================
--- linux-2.6.orig/include/asm-x86_64/local.h
+++ linux-2.6/include/asm-x86_64/local.h
@@ -186,11 +186,12 @@ static __inline__ long local_sub_return(
 #define __local_begin(__flags)		\
 {					\
 	(__flags) = 0;			\
-	preempt_disable();		\
+	migrate_disable();		\
 }
 
-static inline void __local_end(unsigned long flags) {
-	preempt_enable();
+static inline void __local_end(unsigned long flags)
+{
+	migrate_enable();
 }
 
 #define __local_inc(l)		local_inc(l)

--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux