Changeset 6aea2e00 in mainline


Ignore:
Timestamp:
2007-04-09T21:06:22Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ddee708
Parents:
ec5b3204
Message:

use the hlt instruction more properly

Location:
kernel/arch
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/include/asm.h

    rec5b3204 r6aea2e00  
    5656}
    5757
    58 static inline void cpu_sleep(void) { __asm__ volatile ("hlt\n"); };
    59 static inline void cpu_halt(void) { __asm__ volatile ("hlt\n"); };
     58static inline void cpu_sleep(void)
     59{
     60        asm volatile ("hlt\n");
     61};
     62
     63static inline void cpu_halt(void)
     64{
     65        asm volatile ("hlt\n");
     66};
    6067
    6168
  • kernel/arch/amd64/src/pm.c

    rec5b3204 r6aea2e00  
    243243        asm volatile (
    244244                "int $0x03\n"
     245                "cli\n"
    245246                "hlt\n"
    246247        );
  • kernel/arch/ia32/include/asm.h

    rec5b3204 r6aea2e00  
    6060static inline void cpu_halt(void)
    6161{
    62         asm("hlt\n");
     62        asm volatile ("hlt\n");
    6363};
    6464
    6565static inline void cpu_sleep(void)
    6666{
    67         asm("hlt\n");
     67        asm volatile ("hlt\n");
    6868};
    6969
  • kernel/arch/ia32/src/pm.c

    rec5b3204 r6aea2e00  
    249249        asm volatile (
    250250                "int $0x03\n"
     251                "cli\n"
    251252                "hlt\n"
    252253        );
Note: See TracChangeset for help on using the changeset viewer.