From RTSC-Pedia

Jump to: navigation, search
revision tip
—— LANDSCAPE orientation
[printable version]  [offline version]offline version generated on 04-Aug-2010 21:08 UTC

C - Module startup

Module's startup initialization function

Contents

Synopsis

 
 
 
#include "package/internal/«Mod».xdc.h"
 
Int «Mod»_Module_startup(Int state);

Parameters

state 
this parameter serves as "state variable" whose initial value will be Startup_NOTDONE (0) and whose final value will eventually be Startup_DONE (-1). If startup() returns a value other than Startup_DONE, it will be called in a subsequent pass with this return value passed in as the value of state. To ensure this process terminates, no startup function is ever called more than xdc.runtime.Startup.maxPasses times.

Description

Modules that have the @ModuleStartup attribute must implement this startup function, where «Mod» is the name of the module requesting startup support.

For situations in which the startup of one module depends upon another having completed its startup processing, a «Mod»_Module_startupDone() function is also defined, where «Mod» is the name of some module or proxy. These predicates can be used as guards inside of a startup function to probe whether a particular module has completed its own startup processing. As a convenience, the function Startup_rtsDone() probes the necessary set of xdc.runtime modules required to support a module instance create, and should be called before any startup-time instance creation and/or memory allocation is performed.

 
 
 
 
 
 
 
 
Int «Mod»_Module_startup(Int state)
{
    if (!Startup_rtsDone()) {
        return (Startup_NOTDONE);
    }
        :
    return (Startup_DONE);
}

See also

XDCspec - @ModuleStartup This module has a startup initialization function
xdc.runtime.Startup Client documentation for xdc.runtime.Startup
Using xdc.runtime Startup How applications boot, run, and shutdown
[printable version]  [offline version]offline version generated on 04-Aug-2010 21:08 UTC
Copyright © 2008 The Eclipse Foundation. All Rights Reserved


Views
Personal tools
package reference