common: added support for externally pumped mainloops (superloops).
authorKrisztian Litkey <kli@iki.fi>
Fri, 8 Jun 2012 22:16:09 +0000 (01:16 +0300)
committerKrisztian Litkey <kli@iki.fi>
Fri, 8 Jun 2012 22:16:09 +0000 (01:16 +0300)
commit923598449df313a721afbe1fc9abbf8994ca33dd
treed99e99c9ae45b8ccb286f852f85308d92443ca07
parent4fb5127a2403748577c0024ecb5bc147a74b4712
common: added support for externally pumped mainloops (superloops).

Murphy mainloop has now an abstraction - called a superloop - for
external mainloops that pump the murphy mainloop. This abstraction
layer defines the set of functions one needs to implement to integrate
the native murphy mainloop to an external mainloop. Practically this
means implementing functios for

  - adding/deleting file descriptor I/O watches,
  - adding/deleting/modifying timers, and
  - adding/deleting/enabling/disabling deferred callbacks

To integrate murphy to any external mainloop one needs to

   - implement these functions using the external mainloop, and
   - register these functions as the superloops API to murphy
     (using mrp_set_superloop)

After this whenever the superloop is iterated/run, the murphy mainloop
will be iterated/run as well.
src/common/mainloop.c
src/common/mainloop.h