Implement an application main loop
void PtMainLoop( void );
ph
This is a convenience function that implements an application main loop using PhEventNext() and PtEventHandler(). PtMainLoop() also supports background processing (WorkProcs), signals, threads, and the handling of non-Photon messages (inputs).
PtMainLoop() allocates an event buffer and resizes it as necessary. You can set the size yourself by calling PtResizeEventMsg().
To terminate normally, your applications should call PtExit() within a callback function. To terminate a thread that's running PtMainLoop() without terminating the entire application, call PtQuitMainLoop().
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PhEventNext(), PtAppAddInput(), PtAppAddWorkProc(), PtEventHandler(), PtExit(), PtQuitMainLoop(), PtResizeEventMsg()
“Receiving QNX messages” in the Interprocess Communications chapter of the Photon Programmer's Guide