Поделиться через


OEMInit (Compact 2013)

10/16/2014

This function initializes all hardware interfaces for the target device.

Syntax

void OEMInit (void); 

Parameters

None.

Return Value

None.

Remarks

This function can register ISRs by calling the kernel function HookInterrupt.

The OEM implements this function. The kernel calls this fuctnion after it has performed minimal initialization. In this state, interrupts are disabled and the kernel is unable to handle exceptions. The only kernel service available to this function is HookInterrupt.

NKGLOBAL is a structure which kernel exports to OEM Adaptation Layer code. All OAL code has access to this structure through a variable declared in Nkstub.lib named g_pNKGlobal. To update dwProcessorType field of this structure, in this function, OAL code can do the following:

g_pNKGlobal->dwProcessorType = <process type>;

Similarly other data members in the NKGLOBAL structure can be updated by OAL in the call to this function.

The kernel thread scheduler uses the value dwDefaultThreadQuantum, found in the OEMGLOBALstructure, to define the default execution time-slice for each thread.

The default thread quantum for the system can be set by adjusting this variable in OEMInit with the following syntax

g_pOemGlobal->dwDefaultThreadQuantum = 75; // 75 milliseconds

Requirements

Header

nkintr.h

Library

OEMMain.lib or OEMMain_StaticKITL.lib

See Also

Reference

Required OAL Functions
dwMainMemoryEndAddress
OEMQueryPerformanceCounter
OEMQueryPerformanceFrequency
CEProcessorType

Other Resources

SYSTEM_INFO