diff --git a/reactos/ntoskrnl/ex/power.c b/reactos/ntoskrnl/ex/power.c index 94b3159cfa8..b653733b716 100644 --- a/reactos/ntoskrnl/ex/power.c +++ b/reactos/ntoskrnl/ex/power.c @@ -52,7 +52,14 @@ NtShutdownSystem(IN SHUTDOWN_ACTION Action) HalReturnToFirmware (FIRMWARE_OFF); #else PopSetSystemPowerState(PowerSystemShutdown); - __asm__("cli\n"); + +#ifdef __GNUC__ + __asm__("cli\n"); +#elif defined(_MSC_VER) + __asm cli +#else +#error Unknown compiler for inline assembler +#endif while (TRUE) { ; diff --git a/reactos/ntoskrnl/include/internal/debug.h b/reactos/ntoskrnl/include/internal/debug.h index 73abb01fdd7..d73bc67948b 100644 --- a/reactos/ntoskrnl/include/internal/debug.h +++ b/reactos/ntoskrnl/include/internal/debug.h @@ -28,7 +28,6 @@ #endif #define UNIMPLEMENTED do {DbgPrint("%s at %s:%d is unimplemented, have a nice day\n",__FUNCTION__,__FILE__,__LINE__); for(;;); } while(0) - #ifdef DBG /* Assert only on "checked" version */ diff --git a/reactos/ntoskrnl/kd/kdebug.c b/reactos/ntoskrnl/kd/kdebug.c index 2f8b5aca1d9..03b8e328b7f 100644 --- a/reactos/ntoskrnl/kd/kdebug.c +++ b/reactos/ntoskrnl/kd/kdebug.c @@ -1,4 +1,4 @@ -/* $Id: kdebug.c,v 1.48 2003/12/23 05:04:59 arty Exp $ +/* $Id: kdebug.c,v 1.49 2003/12/30 22:06:39 fireball Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -386,7 +386,13 @@ KeEnterKernelDebugger(VOID) HalDisplayString("\n\n *** Entered kernel debugger ***\n"); for (;;) +#ifdef __GNUC__ __asm__("hlt\n\t"); +#elif defined(_MSC_VER) + __asm hlt +#else +#error Unknown compiler for inline assembler +#endif } VOID STDCALL diff --git a/reactos/ntoskrnl/ke/i386/irq.c b/reactos/ntoskrnl/ke/i386/irq.c index 914334c19e5..a5516ce6da6 100644 --- a/reactos/ntoskrnl/ke/i386/irq.c +++ b/reactos/ntoskrnl/ke/i386/irq.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: irq.c,v 1.37 2003/12/30 18:52:05 fireball Exp $ +/* $Id: irq.c,v 1.38 2003/12/30 22:10:45 fireball Exp $ * * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/i386/irq.c @@ -491,7 +491,13 @@ KiInterruptDispatch (ULONG irq, PKIRQ_TRAPFRAME Trapframe) * Enable interrupts * NOTE: Only higher priority interrupts will get through */ - __asm__("sti\n\t"); +#ifdef __GNUC__ + __asm__("sti\n\t"); +#elif defined(_MSC_VER) + __asm sti +#else +#error Unknown compiler for inline assembler +#endif /* * Actually call the ISR. @@ -517,7 +523,14 @@ KiInterruptDispatch (ULONG irq, PKIRQ_TRAPFRAME Trapframe) /* * End the system interrupt. */ - __asm__("cli\n\t"); +#ifdef __GNUC__ + __asm__("cli\n\t"); +#elif defined(_MSC_VER) + __asm cli +#else +#error Unknown compiler for inline assembler +#endif + HalEndSystemInterrupt (old_level, 0); if (old_level==PASSIVE_LEVEL && Trapframe->Cs != KERNEL_CS) diff --git a/reactos/ntoskrnl/ps/idle.c b/reactos/ntoskrnl/ps/idle.c index 7dc1dabb4c2..afd22831155 100644 --- a/reactos/ntoskrnl/ps/idle.c +++ b/reactos/ntoskrnl/ps/idle.c @@ -39,7 +39,13 @@ PsIdleThreadMain(PVOID Context) KeLowerIrql(oldlvl); } NtYieldExecution(); - __asm__( "hlt" ); +#ifdef __GNUC__ + __asm__("hlt\n\t"); +#elif defined(_MSC_VER) + __asm hlt +#else +#error Unknown compiler for inline assembler +#endif } }