Partager via


System Halt (Windows Embedded CE 6.0)

1/5/2010

In the rare case when the system encounters a non-recoverable error and the only recourse is to halt the system, it posts the debug message "Halting system". At that point, the kernel has effectively locked the system and posted the debug message about the halting condition.

The kernel exports a function pointer that can be overridden by the OEM. If the default function pointer value is replaced by the address of an OEM function in the OAL, when the kernel goes to halt the OS, the OAL will be called. If the OEM does not override the function pointer, the default action is to halt the system.

The kernel declares the following function pointer:

extern void (*lpNKHaltSystem)(void);

The following code examples show how the OEM can reassign the function pointer in the OAL.

The following code example shows how to implement the OEMHaltSystem function.

void OEMHaltSystem (void )
{
    //Reset the device.
}

The following code example shows how to implement OEMHaltSystem in OEMInit.

void OEMInit()
{
    extern void (*lpNKHaltSystem)(void);
    lpNKHaltSystem = OEMHaltSystem;
}

The lpNKHaltSystem function does not have any return values or take any parameters. The system will not continue to function after the lpNKHaltSystem function is called.

See Also

Concepts

Other Kernel Tasks
Kernel Initialization