[Previous] [Contents] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

pmm_state_check()

Obtain the current state

Synopsis:

#include <sys/pmm.h>

int pmm_state_check(void *hdl, unsigned *cur_state, 
                              unsigned *new_state);

Library:

libc

Description:

This function is used to obtain the current state or to re-evaluate the state machine's state by calling the current state's check() function:

hdl
Handle to the state machine, returned by pmm_state_init().
cur_state
Pointer to where the current state will be returned.
new_state
Causes the current state's check() function to be invoked to re-evaluate the current state and the resulting state is stored in new_state().

This function ensures that:

This function normally returns EOK, and updates cur_state or new_state if they are non-NULL.

If an error occurs, it returns -1 and errno is set to one of the following:

Returns:

Classification:

QNX Neutrino

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler Yes
Thread Yes

See also:


[Previous] [Contents] [Next]