module xdc.runtime.knl.Sync |
|
|
|
Provides synchronization APIs when an ISync.Handle is available
The application must first obtain an ISync.Handle.
It can get such a handle by directly calling
SyncGeneric.create or
SyncSemThread.create. Then the application can use the generic
APIs provided by this module.
#include <xdc/runtime/knl/Sync.h>
module-wide functions
module-wide built-ins
XDCscript usage |
meta-domain |
var Sync = xdc.useModule('xdc.runtime.knl.Sync');
local proxy modules
module-wide config parameters
module Sync {
local proxy modules
proxy Proxy
inherits ISync;
module-wide config parameters
module-wide functions
}
proxy Sync.Proxy |
|
Proxy used for optimization
XDCscript usage |
meta-domain |
Sync.
Proxy =
ISync.Module null
// some delegate module inheriting the
ISync interface
Sync.
Proxy.delegate$ =
ISync.Module null
// explicit access to the currently bound delegate module
Sync.Proxy.abstractInstances$ = false
// use indirect runtime function calls if true
DETAILS
If ALL ISync.Handles were created using the same module
(e.g SyncSemProcess) then setting this Proxy to SyncSemProcess and
setting Sync.Proxy.abstractInstances$ = false,
Sync APIs can have better performance.
metaonly config Sync.common$ // module-wide |
|
Common module configuration parameters
XDCscript usage |
meta-domain |
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.
Sync.query( ) // module-wide |
|
Query for a particular quality
ARGUMENTS
sync
sync handle
qual
quality
RETURNS
TRUE or FALSE.
DETAILS
FALSE is returned if quality not supported.
Sync.signal( ) // module-wide |
|
Called at completion of an activity
ARGUMENTS
sync
sync handle
DETAILS
This function is non-blocking. It is also required that the underlying
sync be binary in nature.
Sync.wait( ) // module-wide |
|
Called to wait/poll for completion of an activity
ARGUMENTS
sync
sync handle
timeout
timeout
RETURNS
1 for success; 0 for timeout; -1 for error
DETAILS
This function can block. Non-blocking implementations should return
false;
module-wide built-ins |
|
// Get this module's unique id
Bool Sync_Module_startupDone( );
// Test if this module has completed startup
// The heap from which this module allocates memory
generated on Thu, 25 Jun 2009 21:46:10 GMT