module xdc.runtime.knl.SyncNull

Empty ISync implementation used mainly for testing

C synopsis target-domain sourced in xdc/runtime/knl/SyncNull.xdc
#include <xdc/runtime/knl/SyncNull.h>
Functions
Void
Void
Void
Void
Functions common to all ISync modules
Bool 
Void 
Int 
Functions common to all target instances
Functions common to all target modules
Defines
#define
#define
#define
Typedefs
typedef SyncNull_Object *
typedef struct
typedef struct
typedef struct
typedef enum
 
 
const SyncNull_NO_WAIT

Used to specify no waiting

C synopsis target-domain
#define SyncNull_NO_WAIT (UInt)0
 
 
const SyncNull_Q_BLOCKING

Blocking quality

C synopsis target-domain
#define SyncNull_Q_BLOCKING (Int)1
 
DETAILS
Implementations with this "quality" may cause the calling thread to block;
 
const SyncNull_WAIT_FOREVER

Used to wait forever

C synopsis target-domain
#define SyncNull_WAIT_FOREVER (UInt)~(0)
 
 
enum SyncNull_WaitStatus

Error codes returned by ISync_wait

C synopsis target-domain
typedef enum SyncNull_WaitStatus {
    SyncNull_WaitStatus_ERROR,
    SyncNull_WaitStatus_TIMEOUT,
    SyncNull_WaitStatus_SUCCESS
} SyncNull_WaitStatus;
 
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId SyncNull_Module_id();
// Get this module's unique id
 
Bool SyncNull_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle SyncNull_Module_heap();
// The heap from which this module allocates memory
 
Bool SyncNull_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 SyncNull_Module_getMask();
// Returns the diagnostics mask for this module
 
Void SyncNull_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
Instance Object Types

C synopsis target-domain
typedef struct SyncNull_Object SyncNull_Object;
// Opaque internal representation of an instance object
 
typedef SyncNull_Object *SyncNull_Handle;
// Client reference to an instance object
 
typedef struct SyncNull_Struct SyncNull_Struct;
// Opaque client structure large enough to hold an instance object
 
SyncNull_Handle SyncNull_handle(SyncNull_Struct *structP);
// Convert this instance structure pointer into an instance handle
 
SyncNull_Struct *SyncNull_struct(SyncNull_Handle handle);
// Convert this instance handle into an instance structure pointer
Instance Config Parameters

C synopsis target-domain
typedef struct SyncNull_Params {
// Instance config-params structure
    IInstance_Params *instance;
    // Common per-instance configs
} SyncNull_Params;
 
Void SyncNull_Params_init(SyncNull_Params *params);
// Initialize this config-params structure with supplier-specified defaults before instance creation
Instance Creation

C synopsis target-domain
SyncNull_Handle SyncNull_create(const SyncNull_Params *params, Error_Block *eb);
// Allocate and initialize a new instance object and return its handle
 
Void SyncNull_construct(SyncNull_Struct *structP, const SyncNull_Params *params);
// Initialize a new instance object inside the provided structure
ARGUMENTS
params — per-instance config params, or NULL to select default values (target-domain only)
eb — active error-handling block, or NULL to select default policy (target-domain only)
Instance Deletion

C synopsis target-domain
Void SyncNull_delete(SyncNull_Handle *handleP);
// Finalize and free this previously allocated instance object, setting the referenced handle to NULL
 
Void SyncNull_destruct(SyncNull_Struct *structP);
// Finalize the instance object inside the provided structure
 
SyncNull_query()  // instance

Query for a particular quality

C synopsis target-domain
Bool SyncNull_query(SyncNull_Handle handle, Int qual);
 
ARGUMENTS
handle — handle of a previously-created SyncNull instance object
qual — quality
RETURNS
TRUE or FALSE.
DETAILS
FALSE is returned if quality not supported.
 
SyncNull_signal()  // instance

Called at completion of an activity

C synopsis target-domain
Void SyncNull_signal(SyncNull_Handle handle);
 
ARGUMENTS
handle — handle of a previously-created SyncNull instance object
DETAILS
This function is non-blocking. It is also required that the underlying sync be binary in nature.
This function does not take an Error.Block intentionally because it can be called from ISR context.
 
SyncNull_wait()  // instance

Called to wait/poll for completion of an activity

C synopsis target-domain
Int SyncNull_wait(SyncNull_Handle handle, UInt timeout, Error_Block *eb);
 
ARGUMENTS
handle — handle of a previously-created SyncNull instance object
timeout — Timeout in microseconds
eb — Hist Pointer to Error.Block
RETURNS
Refer to description above
DETAILS
This function can block. Non-blocking implementations should return WaitStatus_TIMEOUT to indicate a timeout.
Instance Convertors

C synopsis target-domain
ISync_Handle SyncNull_Handle_upCast(SyncNull_Handle handle);
// unconditionally move one level up the inheritance hierarchy
 
SyncNull_Handle SyncNull_Handle_downCast(ISync_Handle handle);
// conditionally move one level down the inheritance hierarchy; NULL upon failure
Instance Built-Ins

C synopsis target-domain
Int SyncNull_Object_count();
// The number of statically-created instance objects
 
SyncNull_Handle SyncNull_Object_get(SyncNull_Object *array, Int i);
// The handle of the i-th statically-created instance object (array == NULL)
 
SyncNull_Handle SyncNull_Object_first();
// The handle of the first dynamically-created instance object, or NULL
 
SyncNull_Handle SyncNull_Object_next(SyncNull_Handle handle);
// The handle of the next dynamically-created instance object, or NULL
 
IHeap_Handle SyncNull_Object_heap();
// The heap used to allocate dynamically-created instance objects
 
Types_Label *SyncNull_Handle_label(SyncNull_Handle handle, Types_Label *buf);
// The label associated with this instance object
 
String SyncNull_Handle_name(SyncNull_Handle handle);
// The name of this instance object
 
XDCscript usage meta-domain sourced in xdc/runtime/knl/SyncNull.xdc
var SyncNull = xdc.useModule('xdc.runtime.knl.SyncNull');
module-wide constants & types
 
        const SyncNull.WaitStatus_ERROR;
        const SyncNull.WaitStatus_TIMEOUT;
        const SyncNull.WaitStatus_SUCCESS;
module-wide config parameters
per-instance config parameters
    var params = new SyncNull.Params// Instance config-params object;
per-instance creation
    var inst = SyncNull.create// Create an instance-object(params);
 
 
const SyncNull.NO_WAIT

Used to specify no waiting

XDCscript usage meta-domain
const SyncNull.NO_WAIT = 0;
 
C SYNOPSIS
 
const SyncNull.Q_BLOCKING

Blocking quality

XDCscript usage meta-domain
const SyncNull.Q_BLOCKING = 1;
 
DETAILS
Implementations with this "quality" may cause the calling thread to block;
C SYNOPSIS
 
const SyncNull.WAIT_FOREVER

Used to wait forever

XDCscript usage meta-domain
const SyncNull.WAIT_FOREVER = ~(0);
 
C SYNOPSIS
 
enum SyncNull.WaitStatus

Error codes returned by ISync_wait

XDCscript usage meta-domain
values of type SyncNull.WaitStatus
    const SyncNull.WaitStatus_ERROR;
    const SyncNull.WaitStatus_TIMEOUT;
    const SyncNull.WaitStatus_SUCCESS;
 
C SYNOPSIS
 
metaonly config SyncNull.common$  // module-wide

Common module configuration parameters

XDCscript usage meta-domain
SyncNull.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.
Instance Config Parameters

XDCscript usage meta-domain
var params = new SyncNull.Params;
// Instance config-params object
Instance Creation

XDCscript usage meta-domain
var params = new SyncNull.Params;
// Allocate instance config-params
params.config =   ...
// Assign individual configs
 
var inst = SyncNull.create(params);
// Create an instance-object
ARGUMENTS
params — per-instance config params, or NULL to select default values (target-domain only)
eb — active error-handling block, or NULL to select default policy (target-domain only)
generated on Thu, 01 Mar 2012 16:58:46 GMT