Trigger a system-wide event
#include <sys/procmgr.h> int procmgr_event_trigger( const unsigned flags ); int procmgr_event_trigger_updateable( const unsigned flags, const int value );
For descriptions of the events, see Event types in the entry for procmgr_event_notify_add().
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The procmgr_event_trigger() and procmgr_event_trigger_updateable() functions trigger a system-wide event. The event is sent to all processes that requested (via procmgr_event_notify_add() or procmgr_event_notify()) to be notified of the event identified by flags. Each registered process provides a sigevent structure that specifies how it should be notified of the event.
(QNX Neutrino 6.6 or later) The procmgr_event_trigger_updateable() function lets you specify sigev_value for the processes that set SIGEV_FLAG_UPDATEABLE when they registered for notification. For more information about setting this flag, see Hidden bits in the entry for sigevent; for details about the extra information, see procmgr_event_notify_add().
-1 on error (errno is set); any other value indicates success.
#include <sys/procmgr.h> int main ( void ) { procmgr_event_trigger( PROCMGR_EVENT_SYNC ); }
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |