Subversion Repositories HelenOS

Rev

Rev 4011 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4011 Rev 4088
Line 45... Line 45...
45
atomic_t haltstate = {0}; /**< Halt flag */
45
atomic_t haltstate = {0}; /**< Halt flag */
46
 
46
 
47
 
47
 
48
/** Halt wrapper
48
/** Halt wrapper
49
 *
49
 *
50
 * Set halt flag and halt the cpu.
50
 * Set halt flag and halt the CPU.
51
 *
51
 *
52
 */
52
 */
53
void halt()
53
void halt()
54
{
54
{
55
#ifdef CONFIG_DEBUG
55
#ifdef CONFIG_DEBUG
Line 64... Line 64...
64
#endif
64
#endif
65
 
65
   
66
    interrupts_disable();
66
    interrupts_disable();
67
   
67
   
68
#if (defined(CONFIG_DEBUG)) && (defined(CONFIG_KCONSOLE))
68
#if (defined(CONFIG_DEBUG)) && (defined(CONFIG_KCONSOLE))
69
    if (rundebugger)
69
    if ((rundebugger) && (kconsole_check_poll()))
70
        kconsole("panic", "\nLast resort kernel console ready\n", false);
70
        kconsole("panic", "\nLast resort kernel console ready.\n", false);
71
#endif
71
#endif
72
   
72
   
73
    if (CPU)
73
    if (CPU)
74
        printf("cpu%u: halted\n", CPU->id);
74
        printf("cpu%u: halted\n", CPU->id);
75
    else
75
    else
76
        printf("cpu: halted\n");
76
        printf("cpu: halted\n");
-
 
77
   
77
    cpu_halt();
78
    cpu_halt();
78
}
79
}
79
 
80
 
80
/** Convert ascii representation to unative_t
81
/** Convert ascii representation to unative_t
81
 *
82
 *