trace_logbc()
QNX SDP8.0C Library ReferenceAPIDeveloper
Insert a trace event of an arbitrary class and type with arbitrary data
Synopsis:
#include <sys/neutrino.h>
#include <sys/trace.h>
int trace_logbc( int class,
int event,
const void *data,
size_t nbytes );
Arguments:
- class
- The internal event class that you want to insert as returned by _NTO_TRACE_GETEVENT_C().
- event
- The type of event that you want to insert.
- data
- A pointer to the data to include with the event.
- nbytes
- The length of the data, in bytes. The function converts this value into the number of 32-bit integers.
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
The trace_logbc() function calls TraceEvent() to insert an event of the given class and type with the given data. For information about the classes and events, see the Events and the Kernel chapter of the System Analysis Toolkit User's Guide.
Note:
If the length of the data isn't a multiple of 32-bit values, or
the data address isn't 32-bit aligned, the function creates a temporary copy of the data.
Returns:
- 0
- Success.
- -1
- An error occurred (errno is set).
Errors:
- ENOMEM
- Insufficient memory to complete the operation.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |
Page updated: