NAME

coreAppDispatch() -- send a message to the main dispatch thread.


SYNOPSIS

include "appcore.h"

int coreAppDispatch( coreMsg_t* m )

DESCRIPTION

The coreAppDispatch() function sends, or dispatches, a standard appCORE message to the application's main dispatch thread. This function can be called from anywhere in application code to send a message to the main thread. The message must be created via a call to the function coreMsgCreate() or coreMsgDup(). Thread input messages can not be dispatched, they are forwarded via the function coreMsgForward().

If the function fails for any reason, the caller should free the input msg via a call to coreMsgFree() to avoid a resource leak.


PARAMETERS

m
	Pointer to message.

RETURN VALUE

If successful, coreAppDispatch() returns 0. On failure it returns a value of -1 and sets errno to one of the following values:

errno ValueCondition
EINVALInput message is null, or application is not running.
ECANCELEDTrying to dispatch an input message.
EIDRMThe application is not running.
ENOMEMInsufficient memory for operation.

MULTI-THREAD SAFETY LEVEL

MT-safe.


SEE ALSO

Functions:
coreAppStart() coreAppStop() coreAppWaitOnStop() coreAppForward() coreAppLogZoneInit()