traceparser_cs_range()
QNX SDP8.0C Library ReferenceAPIDeveloper
Attach a callback to a range of events
Synopsis:
#include <sys/traceparser.h>
int traceparser_cs_range (
struct traceparser_state * stateptr,
void * userdata,
tracep_callb_func_t funcptr,
unsigned class,
unsigned firstevent,
unsigned lastevent );
Arguments:
- stateptr
- A pointer to an opaque data structure that contains the parser's state information, obtained by calling traceparser_init().
- userdata
- A pointer to arbitrary user data that you want to be passed to the callback function when it's executed.
- funcptr
- A pointer to the callback function that you want to register.
For more information, see
Callback function
in the entry for traceparser_cs(). - class
- The class of trace events that you want to invoke the callback function for.
For information about the supported classes, see
Classes and events
in theEvents and the Kernel
chapter of the System Analysis Toolkit User's Guide. - firstevent, lastevent
- The range of trace events that you want to invoke the callback function for. The events must be
members of the given class. For information about the classes and trace events, see
Classes and events
in theEvents and the Kernel
chapter of the System Analysis Toolkit User's Guide.You can OR the event numbers with _NTO_TRACE_KERCALL64. In this case, the callback is invoked only for kernel events that include 64-bit data types. You might also want to attach a callback for the events without _NTO_TRACE_KERCALL64.
Library:
libtraceparser
Use the -l traceparser option to qcc to link against this library.
Description:
The traceparser_cs_range() function attaches a callback function, given by the pointer funcptr, to a range of events from firstevent through to lastevent inclusive, from one particular class. You'll use this function if you're creating your own utility for parsing trace data (as an alternative to traceprinter).
Returns:
- 0
- Success.
- -1
- Failure; errno is set. See also traceparser_get_info() for further details.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | No |
Thread | No |
Page updated: