Content-type: text/html
Manpage of RTInit
RTInit
Section: Chronolytix (3)
Updated: 2005-07-07
Index
Return to Main Contents
NAME
RTInit - Multi-phase Initialization
SYNOPSYS
#include <RTInit.h>
enum RTInitEpoch {
PRIMORDIAL,
PRE_TASKING,
POST_TASKING,
CORE_COMPLETE,
APPLICATION_INIT_1,
APPLICATION_INIT_2,
...,
APPLICATION_INIT_9 };
typedef int (*RTInitFunction)(void);
int Init(void);
typedef int (*RTInitCallBack)(enum RTInitEpoch requested_epoch);
int RTInit_Register(enum RTInitEpoch epoch, RTInitCallBack init);
void RTInit_RunLevel(enum RTInitEpoch epoch );
enum RTInitEpoch RTInit_Epoch(void);
DESCRIPTION
RTInit
is the Chronolytix class initializing all builtin and runtime loaded modules. Each dynamically loaded module will have an initialization function,
Init
which will be called after it is loaded. The Init function can do local initialization but if there are dependancies on other components, a deferred initialization is required. The
RTInit_Register
allows a module to register a handler for phased initialization. The handler will be called back with the requested RTInitEpoch as the argument. Handlers are called in first-in-first-out order. Handlers registered after a epoch has been initialized are called back immediately.
Epochs
APPLICATION_INIT_1
through
APPLICATION_INIT_9
are reserved for the application. No Chronolytix module will use these epochs. The target application may run in any runlevel after
CORE_COMPLETE.
The function
RTInit_RunLevel
can be used by to set a run level. For instance, after the user initialization of epoch
APPLICATION_INIT_2
the application may "complete" and initiatiate the "next" epoch by calling
RTInit_RunLevel
with the appropriate argument.
The function
RTInit_Epoch
returns the current epoch. This may be useful for code loaded from modules, etc.
MAGIC
RTInit "Init"
SEE ALSO
RTLoadModule
Index
- NAME
-
- SYNOPSYS
-
- DESCRIPTION
-
- MAGIC
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 13:26:33 GMT, August 25, 2005