The PPS service implements io_notify() functionality, allowing subscribers to request notification via a PULSE, SIGNAL, SEMAPHORE, etc. On notification of a change, a subscriber must issue a read() to the object file to get the contents of the object. For example:
/* Process events while there are some */ while ( (flags = ionotify(fd, _NOTIFY_ACTION_POLLARM, _NOTIFY_COND_INPUT, event) != -1 ) && (flags & _NOTIFY_COND_INPUT) ) { nbytes = read(fd, buf, sizeof(buf)); if( nbytes > 0 ) process(buf); } /* If flags != -1, the event will be triggered in the future to get our attention */
For more information, see the entry for ionotify() in the Neutrino Library Reference.