Rev 1821 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1821 | Rev 1828 | ||
---|---|---|---|
Line 53... | Line 53... | ||
53 | 53 | ||
54 | /** Halt CPU |
54 | /** Halt CPU |
55 | * |
55 | * |
56 | * Halt the current CPU until interrupt event. |
56 | * Halt the current CPU until interrupt event. |
57 | */ |
57 | */ |
58 | static inline void cpu_halt(void) { __asm__("hlt\n"); }; |
58 | #define cpu_halt() ((void) 0) |
59 | static inline void cpu_sleep(void) { __asm__("hlt\n"); }; |
59 | #define cpu_sleep() ((void) 0) |
60 | 60 | ||
61 | #define GEN_READ_REG(reg) static inline unative_t read_ ##reg (void) \ |
61 | #define GEN_READ_REG(reg) static inline unative_t read_ ##reg (void) \ |
62 | { \ |
62 | { \ |
63 | unative_t res; \ |
63 | unative_t res; \ |
64 | __asm__ volatile ("movl %%" #reg ", %0" : "=r" (res) ); \ |
64 | __asm__ volatile ("movl %%" #reg ", %0" : "=r" (res) ); \ |