Create a new state machine
#include <sys/pmm.h>
void * pmm_state_init(int nstates, pmm_state_t *states,
void *data, unsigned init_state);
libc
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
 |
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.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |