Appearance
Dispatch
Asynchronous dispatch queue.
The asynchronous dispatch queue provides a means of delegating a function call from the current execution context into a "background" thread. This is useful if the caller has a very limited amount of stack memory and can't tell what the callee's stack requirements are. Also, in situations where the calling function execution is time-critial whilst the callee is not, by dispatching the call the caller can continue to execute in deterministic time.
Types
Name | |
---|---|
typedef void(*)(void *) | osDispatchQueueCbFunc_t async dispatch queue function prototype |
Functions Overview
Name | |
---|---|
osStatus_t | osDispatchAsync(osDispatchQueueCbFunc_t f, void * params) a utility function to execute a function asynchronously. |
Types Documentation
typedef osDispatchQueueCbFunc_t
cpp
typedef void(* osDispatchQueueCbFunc_t) (void *);
async dispatch queue function prototype
Function Details
function osDispatchAsync
cpp
osStatus_t osDispatchAsync(
osDispatchQueueCbFunc_t f,
void * params
)
a utility function to execute a function asynchronously.
Parameters:
- f the function to be dispatched asynchronously
- params pointer to a user-defined set of parameters that are passed to f().
Return: osOK if the call was dispatched sucessfully. osError if it failed, most likely due to low resources.
this functionality makes sense, when something needs to be dispatched from a time-critical section of code, where the time it takes the callee to execute is non deterministic, or not known to the caller. The stack-memory available for the callee at execution time currently is fixed at 1024 bytes. It will be made configurable via the SysConfig in a future release.