[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_init()

Create a new state machine

Synopsis:

#include <sys/pmm.h>

void * pmm_state_init(int nstates, pmm_state_t *states, 
                      void *data, unsigned init_state);

Library:

libc

Description:

This function creates a new state machine based on the set of supplied states:

nstates
Specifies the number of states in the state machine.
states
An array of structures that describe each state
Note: The internal data structure for the state machine directly uses this pointer, so the states[] array must be global/static.

data
An opaque value passed to each of the state functions. is an opaque value passed to each the state functions
init_state
Initial state that the state machine will be set to.

Returns:

Classification:

QNX Neutrino

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

See also:


[Previous] [Contents] [Next]