Insert a user string trace event
Synopsis:
#include <sys/neutrino.h>
#include <sys/trace.h>
int trace_logf( int code,
const char *fmt, ...);
Arguments:
-
code
- The event code, which must be in the range from
_NTO_TRACE_USERFIRST through
_NTO_TRACE_USERLAST.
-
fmt
- A
printf()
-style
formatting string.
This must be followed by additional arguments that provide the items
required by the fmt string.
Library:
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
Description:
The trace_logf() function calls
TraceEvent()
to insert a user string event of class
_NTO_TRACE_USER, and of the type specified by code.
Returns:
- 0
- Success.
- -1
- An error occurred
(
errno
is set).
Errors:
-
ECANCELED
- The requested action has been canceled.
-
EFAULT
- Bad internal trace buffer address.
The requested action has been specified out of order.
-
ENOMEM
- Insufficient memory to allocate the trace buffers.
-
ENOTSUP
- The requested action isn't supported.
-
EPERM
- The application doesn't have permission to perform the action.
Classification:
QNX Neutrino
| Safety: |
|
| Cancellation point |
No |
| Interrupt handler |
Read the Caveats
|
| Signal handler |
Yes |
| Thread |
Yes |
Caveats:
It isn't safe to call this function from an interrupt handler if the
formatting codes or parameters include floating-point elements.