posix_trace_eventtypelist_getnext_id and posix_trace_eventtypelist_rewind Subroutines
Purpose
Iterate over a mapping of trace event types.
Library
Posix Trace Library (libposixtrace.a)
Syntax
#include <trace.h>
int posix_trace_eventtypelist_getnext_id(trid, event, unavailable)
trace_id_t trid;
trace_event_id_t *restrict event;
int *restrict unavailable;
int posix_trace_eventtypelist_rewind(trid)
trace_id_t trid;
Description
The first time the posix_trace_eventtypelist_getnext_id subroutine is called, it returns the first trace event type identifier of the list of trace events identified by the trid parameter. The identifier is returned in the event variable. The trace events belong to the trace stream that is identified by the trid parameter. Successive calls to the posix_trace_eventtypelist_getnext_id subroutine return in the event variable the next trace event type identifier in that same list. Each time a trace event type identifier is successfully written into the event parameter, the unavailable parameter is set to zero. When no more trace event type identifiers are available, the unavailable parameter is set to a value of nonzero.
The posix_trace_eventtypelist_rewind subroutine resets the next trace event type identifier, so it is read to the first trace event type identifier from the list of trace events that is used in the trace stream identified by the trid parameter.
Parameters
Item | Description |
---|---|
trid | Specifies the trace stream identifier. |
event | Specifies the trace event identifier. |
unavailable | Specifies the location set to zero if a trace event type is reported; otherwise, it is nonzero. |
Return Values
On successful completion, these subroutines return a value of zero. Otherwise, they return the corresponding error number.
If successful, the posix_trace_eventtypelist_getnext_id subroutine stores the trace event type identifier value in the object pointed to by the event parameter.
Errors
Item | Description |
---|---|
EINVAL | The trid parameter is not a valid trace stream identifier. |
Files
The trace.h file in Files Reference.