module xdc.runtime.knl.Semaphore |
|
|
|
Provides semaphore services when an ISemaphore.Handle is available
An application can isolate itself from ISemaphore implementations by using
this module. The application must first obtain an ISemaphore.Handle.
It make get such a handle by directly calling
SemThread.create or
SemProcess.create. Then the application can use the generic
APIs provided by this module.
#include <xdc/runtime/knl/Semaphore.h>
Functions |
Int | |
Bool | |
Functions common to all target modules |
|
|
Defines |
#define | |
Typedefs |
typedef enum | |
const Semaphore_FOREVER |
|
Used as the timeout value to specify wait forever
enum Semaphore_PendStatus |
|
Error codes returned by Semaphore_pend
typedef enum Semaphore_PendStatus {
Semaphore_PendStatus_ERROR,
Semaphore_PendStatus_TIMEOUT,
Semaphore_PendStatus_SUCCESS
} Semaphore_PendStatus;
Semaphore_pend() // module-wide |
|
Wait for the semaphore to have a nonzero count, then decrement it
ARGUMENTS
sem
ISemaphore.Handle to be used
eb
Pointer to Error.Block
DETAILS
The function returns one of the following:
RETURNS
status returned. (refer to above description)
Semaphore_post() // module-wide |
|
Increment the semaphore count
ARGUMENTS
sem
ISemaphore.Handle to be used
eb
Pointer to Error.Block
RETURNS
true for success, false for error in Error block.
Module-Wide Built-Ins |
|
// Get this module's unique id
Bool Semaphore_Module_startupDone();
// Test if this module has completed startup
// The heap from which this module allocates memory
Bool Semaphore_Module_hasMask();
// Test whether this module has a diagnostics mask
Bits16 Semaphore_Module_getMask();
// Returns the diagnostics mask for this module
Void Semaphore_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
var Semaphore = xdc.useModule('xdc.runtime.knl.Semaphore');
local proxy modules
module-wide constants & types
module-wide config parameters
generated on Thu, 27 Sep 2012 23:21:09 GMT