cause a proxy to be triggered when a trace buffer reaches a given level
#include <sys/trace.h> int qnx_trace_trigger( pid_t proc_pid, long hi_water, pid_t proxy );
The qnx_trace_trigger() function causes the specified proxy to be triggered when the amount of data in the trace buffer reaches the hi_water mark. To have a proxy triggered, qnx_trace_open() must have been previously called.
If hi_water is -1, the trigger level isn't changed, otherwise it is set.
If proxy is -1, it isn't changed. If it's zero, triggering is disabled, otherwise it's set to the specified proxy.
The proc_pid argument is the process ID of the process manager, Proc. If proc_pid is zero or PROC_PID, the Proc on the current node is used, and the trace buffer on the current node is accessed.
/* * Change the high water level */ #include <stdio.h> #include <sys/trace.h> void main( int argc, char *argv[] ) { if( argc > 1 ) { printf( "Changing high water to %ld, ", atol( argv[1] ) ); if( qnx_trace_trigger( 0, atol( argv[1] ), -1 ) == -1 ) { printf( "Failed\n" ); } else { printf( "Successful\n" ); } } }
QNX
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | Yes, but modifies errno |
Thread | Yes |
errno, qnx_trace_severity(), qnx_trace_info(), qnx_trace_open(), qnx_trace_read(), qnx_trace_close(), Trace(), qnx_vc_attach()