[Previous] [Contents] [Index] [Next]

PtMainLoop()

Implement an application main loop

Synopsis:

void PtMainLoop( void );

Description:

This is a convenience function that implements an application main loop using PhEventNext() and PtEventHandler(). Background processing (WorkProcs) and handling of non-Photon messages (inputs) are also supported by this function.

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 exit() (see the C Library Reference) within a callback function.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PhEventNext(), PtAppAddInput(), PtAppAddWorkProc(), PtEventHandler(), PtResizeEventMsg()

"Receiving QNX messages" in the Interprocess Communications and Lengthy Procedures chapter of the Photon Programmer's Guide


[Previous] [Contents] [Index] [Next]