Changeset 67a88c3 in mainline for kernel/generic/src/lib/func.c


Ignore:
Timestamp:
2009-03-12T17:47:21Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a02e383
Parents:
ac8e7a9
Message:

do not create last resort console if there is no polling input device
cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/lib/func.c

    rac8e7a9 r67a88c3  
    4848/** Halt wrapper
    4949 *
    50  * Set halt flag and halt the cpu.
     50 * Set halt flag and halt the CPU.
    5151 *
    5252 */
     
    5555#ifdef CONFIG_DEBUG
    5656        bool rundebugger = false;
    57 
     57       
    5858        if (!atomic_get(&haltstate)) {
    5959                atomic_set(&haltstate, 1);
     
    6363        atomic_set(&haltstate, 1);
    6464#endif
    65 
     65       
    6666        interrupts_disable();
    6767       
    6868#if (defined(CONFIG_DEBUG)) && (defined(CONFIG_KCONSOLE))
    69         if (rundebugger)
    70                 kconsole("panic", "\nLast resort kernel console ready\n", false);
     69        if ((rundebugger) && (kconsole_check_poll()))
     70                kconsole("panic", "\nLast resort kernel console ready.\n", false);
    7171#endif
    7272       
     
    7575        else
    7676                printf("cpu: halted\n");
     77       
    7778        cpu_halt();
    7879}
Note: See TracChangeset for help on using the changeset viewer.