Changeset 82474ef in mainline for kernel/arch/ia32/include/asm.h


Ignore:
Timestamp:
2010-02-03T12:45:26Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
210e50a
Parents:
c1d3549
Message:

improve the GCC contract of halt(), make it explicitly noreturn

File:
1 edited

Legend:

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

    rc1d3549 r82474ef  
    6060 *
    6161 */
    62 static inline void cpu_halt(void)
    63 {
    64         asm volatile (
    65                 "0:\n"
    66                 "       hlt\n"
    67                 "       jmp 0b\n"
    68         );
     62static inline __attribute__((noreturn)) void cpu_halt(void)
     63{
     64        while (true) {
     65                asm volatile (
     66                        "hlt\n"
     67                );
     68        }
    6969}
    7070
Note: See TracChangeset for help on using the changeset viewer.