This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Obtain the current state
#include <sys/pmm.h> int pmm_state_check(void *hdl, unsigned *cur_state, unsigned *new_state);
libc
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:
This function ensures that:
This ensures that cur_state and new_state are consistent.
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:
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |