Ticket #5344: arch_int.patch
File arch_int.patch, 700 bytes (added by , 14 years ago) |
---|
-
headers/private/kernel/arch/x86/arch_int.h
25 25 asm volatile("pushfl;\n" 26 26 "popl %0;\n" 27 27 "cli" : "=g" (flags)); 28 return (flags & 0x200) != 0;28 return flags ; 29 29 } 30 30 31 31 32 32 static inline void 33 33 arch_int_restore_interrupts_inline(int oldState) 34 34 { 35 int flags = oldState ? 0x200 : 0; 36 37 asm volatile("pushfl;\n" 38 "popl %0;\n" 39 "andl $0xfffffdff,%0;\n" 40 "orl %1,%0;\n" 41 "pushl %0;\n" 42 "popfl\n" 43 : "=&r"(flags) : "r"(flags)); 35 if( oldState & 0x200 ) 36 asm("sti"); 44 37 } 45 38 46 39