module xdc.runtime.SysCallback

ISystemSupport implementation for user callback functions

This module provides a implementation of the ISystemSupport interface that simply calls back the user defined functions to enable the System module's functionality. [ more ... ]
C synopsis target-domain sourced in xdc/runtime/SysCallback.xdc
#include <xdc/runtime/SysCallback.h>
Functions common to all ISystemSupport modules
Void 
Void 
Void 
Void 
Bool 
Functions common to all target modules
Typedefs
typedef Void 
typedef Void 
typedef Void 
typedef Void 
typedef Bool 
Constants
extern const SysCallback_AbortFxn 
extern const SysCallback_ExitFxn 
extern const SysCallback_FlushFxn 
extern const SysCallback_PutchFxn 
extern const SysCallback_ReadyFxn 
 
DETAILS
This module provides a implementation of the ISystemSupport interface that simply calls back the user defined functions to enable the System module's functionality.
Configuration is as shown below.
  var SysCallback = xdc.useModule('xdc.runtime.SysCallback');
  SysCallback.abortFxn = "&userAbort";
  SysCallback.exitFxn  = "&userExit";
  SysCallback.flushFxn = "&userFlush";
  SysCallback.putchFxn = "&userPutch";
  SysCallback.readyFxn = "&userReady";

 
typedef SysCallback_AbortFxn

Abort function signature

C synopsis target-domain
typedef Void (*SysCallback_AbortFxn)(CString);
 
 
typedef SysCallback_ExitFxn

Exit function signature

C synopsis target-domain
typedef Void (*SysCallback_ExitFxn)(Int);
 
 
typedef SysCallback_FlushFxn

Flush function signature

C synopsis target-domain
typedef Void (*SysCallback_FlushFxn)();
 
 
typedef SysCallback_PutchFxn

Putch function signature

C synopsis target-domain
typedef Void (*SysCallback_PutchFxn)(Char);
 
 
typedef SysCallback_ReadyFxn

Ready function signature

C synopsis target-domain
typedef Bool (*SysCallback_ReadyFxn)();
 
 
config SysCallback_abortFxn  // module-wide

User supplied abort function

C synopsis target-domain
extern const SysCallback_AbortFxn SysCallback_abortFxn;
 
DETAILS
This function is called when the application calls System.abort() function. If the user supplied funtion returns, the abort function of the ANSI C Standard library is called. For more information see the System.abort() documentation.
By default, this function is configured with a default abort function. This default abort function spins forever and never returns.
 
config SysCallback_exitFxn  // module-wide

User supplied exit function

C synopsis target-domain
extern const SysCallback_ExitFxn SysCallback_exitFxn;
 
DETAILS
This function is called when the application calls System.exit() function. If the user supplied function returns, the ANSI C Standard Library atexit processing will be completed. For more information see the System.exit() documentation.
By default, this function is configured with a default exit function. The default exit function does nothing and returns.
 
config SysCallback_flushFxn  // module-wide

User supplied flush function

C synopsis target-domain
extern const SysCallback_FlushFxn SysCallback_flushFxn;
 
DETAILS
This function is called when the application calls System.flush() function.
By default, this function is configured with a default flush function. The default flush function does nothing and returns.
 
config SysCallback_putchFxn  // module-wide

User supplied character output function

C synopsis target-domain
extern const SysCallback_PutchFxn SysCallback_putchFxn;
 
DETAILS
This function is called whenever the System module needs to output a character; e.g., during System.printf() or System.putch().
By default, this function is configured with a default putch function. The default putch function drops the characters.
 
config SysCallback_readyFxn  // module-wide

User supplied ready function

C synopsis target-domain
extern const SysCallback_ReadyFxn SysCallback_readyFxn;
 
DETAILS
This function is called by the System module prior to performing any character output to check if the SystemSupport module is ready to accept the character. For more information see the ISystemSupport.ready() documentation.
By default, this function is configured with a default ready function. The default ready function returns TRUE always.
 
SysCallback_abort()  // module-wide

Backend for System.abort()

C synopsis target-domain
Void SysCallback_abort(CString str);
 
ARGUMENTS
str — message to output just prior to aborting
If non-NULL, this string should be output just prior to terminating.
DETAILS
This function is called by System.abort() prior to calling the ANSI C Standard library function abort(). So, to ensure the abort processing of the system's ANSI C Standard library completes, this function should return to its caller.
 
SysCallback_exit()  // module-wide

Backend for System.exit()

C synopsis target-domain
Void SysCallback_exit(Int stat);
 
ARGUMENTS
stat — status value passed to all "atexit" handlers
This value is passed to all "atexit" handles bound via System.atexit().
DETAILS
This function is called as part the normal "atexit" processing performed by the ANSI C Standard Library's exit() function; System.exit() directly calls ANSI exit().
This function is called after all "atexit" handlers bound via System.atexit() are run and it is always called while "inside" the the System gate.
To ensure that all exit processing of the system's ANSI C Standard Library completes, this function should return to its caller. Exit handlers bound using the ANSI C Standard Library atexit() function may run before or after this function.
SEE
 
SysCallback_flush()  // module-wide

Backend for System.flush()

C synopsis target-domain
Void SysCallback_flush();
 
DETAILS
This function is simply called by System_flush to output any characters buffered by the underlying SystemSupport module to an output device.
 
SysCallback_putch()  // module-wide

Backend for System.printf() and System.putch()

C synopsis target-domain
Void SysCallback_putch(Char ch);
 
ARGUMENTS
ch — character to output
DETAILS
Output a single character. This function is called by System_printf() to write each character of formated output specified by its arguments.
 
SysCallback_ready()  // module-wide

Test if character output can proceed

C synopsis target-domain
Bool SysCallback_ready();
 
DETAILS
This function is called by System prior to performing any character output. If this function returns FALSE, the System functions that would normally call putch() simply return (with an appropriate error status) without ever calling putch.
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId SysCallback_Module_id();
// Get this module's unique id
 
Bool SysCallback_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle SysCallback_Module_heap();
// The heap from which this module allocates memory
 
Bool SysCallback_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 SysCallback_Module_getMask();
// Returns the diagnostics mask for this module
 
Void SysCallback_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
 
Configuration settings sourced in xdc/runtime/SysCallback.xdc
var SysCallback = xdc.useModule('xdc.runtime.SysCallback');
module-wide config parameters
    SysCallback.abortFxn// User supplied abort function = Void(*)(CString) "&xdc_runtime_SysCallback_defaultAbort";
    SysCallback.exitFxn// User supplied exit function = Void(*)(Int) "&xdc_runtime_SysCallback_defaultExit";
    SysCallback.flushFxn// User supplied flush function = Void(*)() "&xdc_runtime_SysCallback_defaultFlush";
    SysCallback.putchFxn// User supplied character output function = Void(*)(Char) "&xdc_runtime_SysCallback_defaultPutch";
    SysCallback.readyFxn// User supplied ready function = Bool(*)() "&xdc_runtime_SysCallback_defaultReady";
 
 
 
config SysCallback.abortFxn  // module-wide

User supplied abort function

Configuration settings
SysCallback.abortFxn = Void(*)(CString) "&xdc_runtime_SysCallback_defaultAbort";
 
DETAILS
This function is called when the application calls System.abort() function. If the user supplied funtion returns, the abort function of the ANSI C Standard library is called. For more information see the System.abort() documentation.
By default, this function is configured with a default abort function. This default abort function spins forever and never returns.
C SYNOPSIS
 
config SysCallback.exitFxn  // module-wide

User supplied exit function

Configuration settings
SysCallback.exitFxn = Void(*)(Int) "&xdc_runtime_SysCallback_defaultExit";
 
DETAILS
This function is called when the application calls System.exit() function. If the user supplied function returns, the ANSI C Standard Library atexit processing will be completed. For more information see the System.exit() documentation.
By default, this function is configured with a default exit function. The default exit function does nothing and returns.
C SYNOPSIS
 
config SysCallback.flushFxn  // module-wide

User supplied flush function

Configuration settings
SysCallback.flushFxn = Void(*)() "&xdc_runtime_SysCallback_defaultFlush";
 
DETAILS
This function is called when the application calls System.flush() function.
By default, this function is configured with a default flush function. The default flush function does nothing and returns.
C SYNOPSIS
 
config SysCallback.putchFxn  // module-wide

User supplied character output function

Configuration settings
SysCallback.putchFxn = Void(*)(Char) "&xdc_runtime_SysCallback_defaultPutch";
 
DETAILS
This function is called whenever the System module needs to output a character; e.g., during System.printf() or System.putch().
By default, this function is configured with a default putch function. The default putch function drops the characters.
C SYNOPSIS
 
config SysCallback.readyFxn  // module-wide

User supplied ready function

Configuration settings
SysCallback.readyFxn = Bool(*)() "&xdc_runtime_SysCallback_defaultReady";
 
DETAILS
This function is called by the System module prior to performing any character output to check if the SystemSupport module is ready to accept the character. For more information see the ISystemSupport.ready() documentation.
By default, this function is configured with a default ready function. The default ready function returns TRUE always.
C SYNOPSIS
 
metaonly config SysCallback.common$  // module-wide

Common module configuration parameters

Configuration settings
SysCallback.common$ = Types.Common$ undefined;
 
DETAILS
All modules have this configuration parameter. Its name contains the '$' character to ensure it does not conflict with configuration parameters declared by the module. This allows new configuration parameters to be added in the future without any chance of breaking existing modules.
generated on Tue, 18 Aug 2015 20:41:16 GMT