posix_trace_eventid_get_name Subroutine
Purpose
Retrieves the trace event name from a trace event type identifier.
Library
Posix Trace Library (libposixtrace.a)
Syntax
#include <trace.h>
int posix_trace_eventid_get_name(trid, event, event_name)
trace_id_t trid;
trace_event_id_t event;
char *event_name;
Description
The posix_trace_eventid_get_name subroutine returns the trace event name associated with the trace event type identifier for a trace stream or a trace log in the argument pointed to by the event_name parameter. The event argument defines the trace event type identifier. The trid argument defines the trace stream or the trace log. The name of the trace event will have a maximum number of characters defined in the TRACE_EVENT_NAME_MAX variable, which has the minimum value _POSIX_TRACE_EVENT_NAME_MAX. Successive calls to this subroutine with the same trace event type identifier and the same trace stream identifier return the same event name.
Parameters
Item | Description |
---|---|
trid | Specifies the trace stream identifier. |
event | Specifies the trace event identifier. |
event_name | Specifies the trace event name. |
Return Values
On successful completion, the posix_trace_eventid_get_name subroutine returns a value of zero. Otherwise, it returns the corresponding error number.
If successful, the posix_trace_eventid_get_name subroutine stores the trace event name value in the object pointed to by the event_name parameter.
Errors
Item | Description |
---|---|
EINVAL | The trid argument is not a valid trace stream identifier. The trace event type identifier event is not associated with any name. |
File
The trace.h file in Files Reference.