An event QSMM_EVT_NODE_ENTER sent to an instruction class set and an event QSMM_EVT_ACTIVATE sent to an instruction meta-class have an associated flag indicating whether the function qsmm_node_call_default should finish node execution and exit after the call to an event handler.
That function resets the flag before calling the event handler.
On finishing node execution, the function sends an event QSMM_EVT_NODE_LEAVE to the instruction class set.
Use the following functions in an event handler to query or set the flag causing to return from the last nested call to qsmm_node_call_default.
In case of setting the flag while processing an event QSMM_EVT_ACTIVATE by the event handler of an instruction meta-class, qsmm_node_call_default ignores a set instruction outcome.
int qsmm_get_mehcall_return (qsmm_mehcall_t mehcall) ¶This function returns the flag indicating whether the function qsmm_node_call_default should exit after processing an event, where mehcall is an event handler function argument.
A positive flag value means “true,” and zero flag value means “false.”
If the context of calling qsmm_get_mehcall_return is not the event handler of an instruction class set on processing an event QSMM_EVT_NODE_ENTER and not the event handler of an instruction meta-class on processing an event QSMM_EVT_ACTIVATE, the function returns negative error code QSMM_ERR_UNTIMELY.
int qsmm_set_mehcall_return (qsmm_mehcall_t mehcall, int flag) ¶This function sets the flag indicating whether the function qsmm_node_call_default should exit after processing an event, where mehcall is an event handler function argument.
A positive value of flag means “true,” and zero value of flag means “false.”
On success, the function returns a non-negative value.
If the context of calling qsmm_set_mehcall_return is not the event handler of an instruction class set on processing an event QSMM_EVT_NODE_ENTER and not the event handler of an instruction meta-class on processing an event QSMM_EVT_ACTIVATE, the function returns negative error code QSMM_ERR_UNTIMELY.