Blame man-pages-posix-2013-a/man3p/posix_trace_eventid_equal.3p

Packit 7cfc04
'\" et
Packit 7cfc04
.TH POSIX_TRACE_EVENTID_EQUAL "3P" 2013 "IEEE/The Open Group" "POSIX Programmer's Manual"
Packit 7cfc04
.SH PROLOG
Packit 7cfc04
This manual page is part of the POSIX Programmer's Manual.
Packit 7cfc04
The Linux implementation of this interface may differ (consult
Packit 7cfc04
the corresponding Linux manual page for details of Linux behavior),
Packit 7cfc04
or the interface may not be implemented on Linux.
Packit 7cfc04
Packit 7cfc04
.SH NAME
Packit 7cfc04
posix_trace_eventid_equal,
Packit 7cfc04
posix_trace_eventid_get_name,
Packit 7cfc04
posix_trace_trid_eventid_open
Packit 7cfc04
\(em manipulate the trace event type identifier
Packit 7cfc04
(\fBTRACING\fP)
Packit 7cfc04
.SH SYNOPSIS
Packit 7cfc04
.LP
Packit 7cfc04
.nf
Packit 7cfc04
#include <trace.h>
Packit 7cfc04
.P
Packit 7cfc04
int posix_trace_eventid_equal(trace_id_t \fItrid\fP, trace_event_id_t \fIevent1\fP,
Packit 7cfc04
    trace_event_id_t \fIevent2\fP);
Packit 7cfc04
int posix_trace_eventid_get_name(trace_id_t \fItrid\fP,
Packit 7cfc04
    trace_event_id_t \fIevent\fP, char *\fIevent_name\fP);
Packit 7cfc04
int posix_trace_trid_eventid_open(trace_id_t \fItrid\fP,
Packit 7cfc04
    const char *restrict \fIevent_name\fP,
Packit 7cfc04
    trace_event_id_t *restrict \fIevent\fP);
Packit 7cfc04
.fi
Packit 7cfc04
.SH DESCRIPTION
Packit 7cfc04
The
Packit 7cfc04
\fIposix_trace_eventid_equal\fR()
Packit 7cfc04
function shall compare the trace event type identifiers
Packit 7cfc04
.IR event1
Packit 7cfc04
and
Packit 7cfc04
.IR event2
Packit 7cfc04
from the same trace stream or the same trace log identified by the
Packit 7cfc04
.IR trid
Packit 7cfc04
argument. If the trace event type identifiers
Packit 7cfc04
.IR event1
Packit 7cfc04
and
Packit 7cfc04
.IR event2
Packit 7cfc04
are from different trace streams, the return value shall be
Packit 7cfc04
unspecified.
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
\fIposix_trace_eventid_get_name\fR()
Packit 7cfc04
function shall return, in the argument pointed to by
Packit 7cfc04
.IR event_name ,
Packit 7cfc04
the trace event name associated with the trace event type identifier
Packit 7cfc04
identified by the argument
Packit 7cfc04
.IR event ,
Packit 7cfc04
for the trace stream or for the trace log identified by the
Packit 7cfc04
.IR trid
Packit 7cfc04
argument. The name of the trace event shall have a maximum of
Packit 7cfc04
{TRACE_EVENT_NAME_MAX}
Packit 7cfc04
characters (which has the minimum value
Packit 7cfc04
{_POSIX_TRACE_EVENT_NAME_MAX}).
Packit 7cfc04
Successive calls to this function with the same trace event type
Packit 7cfc04
identifier and the same trace stream identifier shall return the same
Packit 7cfc04
event name.
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
\fIposix_trace_trid_eventid_open\fR()
Packit 7cfc04
function shall associate a user trace event name with a trace
Packit 7cfc04
event type identifier for a given trace stream. The trace stream is
Packit 7cfc04
identified by the
Packit 7cfc04
.IR trid
Packit 7cfc04
argument, and it shall be an active trace stream. The trace event name
Packit 7cfc04
is the string pointed to by the argument
Packit 7cfc04
.IR event_name .
Packit 7cfc04
It shall have a maximum of
Packit 7cfc04
{TRACE_EVENT_NAME_MAX}
Packit 7cfc04
characters (which has the minimum value
Packit 7cfc04
{_POSIX_TRACE_EVENT_NAME_MAX}).
Packit 7cfc04
The number of user trace event type identifiers that can be defined for
Packit 7cfc04
any given process is limited by the maximum value
Packit 7cfc04
{TRACE_USER_EVENT_MAX},
Packit 7cfc04
which has the minimum value
Packit 7cfc04
{_POSIX_TRACE_USER_EVENT_MAX}.
Packit 7cfc04
.P
Packit 7cfc04
If the Trace Inherit option is not supported, the
Packit 7cfc04
\fIposix_trace_trid_eventid_open\fR()
Packit 7cfc04
function shall associate the user trace event name pointed to by the
Packit 7cfc04
.IR event_name
Packit 7cfc04
argument with a trace event type identifier that is unique for the
Packit 7cfc04
process being traced in the trace stream identified by the
Packit 7cfc04
.IR trid
Packit 7cfc04
argument, and is returned in the variable pointed to by the
Packit 7cfc04
.IR event
Packit 7cfc04
argument. If the user trace event name has already been mapped for the
Packit 7cfc04
traced process, then the previously assigned trace event type
Packit 7cfc04
identifier shall be returned. If the per-process user trace event name
Packit 7cfc04
limit represented by
Packit 7cfc04
{TRACE_USER_EVENT_MAX}
Packit 7cfc04
has been reached, the pre-defined POSIX_TRACE_UNNAMED_USEREVENT (see
Packit 7cfc04
.IR "Table 2-7" ", " "Trace Option: User Trace Event")
Packit 7cfc04
user trace event shall be returned.
Packit 7cfc04
.P
Packit 7cfc04
If the Trace Inherit option is supported, the
Packit 7cfc04
\fIposix_trace_trid_eventid_open\fR()
Packit 7cfc04
function shall associate the user trace event name pointed to by the
Packit 7cfc04
.IR event_name
Packit 7cfc04
argument with a trace event type identifier that is unique for all the
Packit 7cfc04
processes being traced in the trace stream identified by the
Packit 7cfc04
.IR trid
Packit 7cfc04
argument, and is returned in the variable pointed to by the
Packit 7cfc04
.IR event
Packit 7cfc04
argument. If the user trace event name has already been mapped for the
Packit 7cfc04
traced processes, then the previously assigned trace event type
Packit 7cfc04
identifier shall be returned. If the per-process user trace event name
Packit 7cfc04
limit represented by
Packit 7cfc04
{TRACE_USER_EVENT_MAX}
Packit 7cfc04
has been reached, the pre-defined POSIX_TRACE_UNNAMED_USEREVENT (see
Packit 7cfc04
.IR "Table 2-7" ", " "Trace Option: User Trace Event")
Packit 7cfc04
user trace event shall be returned.
Packit 7cfc04
.SH "RETURN VALUE"
Packit 7cfc04
Upon successful completion, the
Packit 7cfc04
\fIposix_trace_eventid_get_name\fR()
Packit 7cfc04
and
Packit 7cfc04
\fIposix_trace_trid_eventid_open\fR()
Packit 7cfc04
functions shall return a value of zero. Otherwise, they shall return
Packit 7cfc04
the corresponding error number.
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
\fIposix_trace_eventid_equal\fR()
Packit 7cfc04
function shall return a non-zero value if
Packit 7cfc04
.IR event1
Packit 7cfc04
and
Packit 7cfc04
.IR event2
Packit 7cfc04
are equal; otherwise, a value of zero shall be returned. No errors are
Packit 7cfc04
defined. If either
Packit 7cfc04
.IR event1
Packit 7cfc04
or
Packit 7cfc04
.IR event2
Packit 7cfc04
are not valid trace event type identifiers for the trace stream
Packit 7cfc04
specified by
Packit 7cfc04
.IR trid
Packit 7cfc04
or if the
Packit 7cfc04
.IR trid
Packit 7cfc04
is invalid, the behavior shall be unspecified.
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
\fIposix_trace_eventid_get_name\fR()
Packit 7cfc04
function stores the trace event name value in the object pointed to by
Packit 7cfc04
.IR event_name ,
Packit 7cfc04
if successful.
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
\fIposix_trace_trid_eventid_open\fR()
Packit 7cfc04
function stores the trace event type identifier value in the object
Packit 7cfc04
pointed to by
Packit 7cfc04
.IR event ,
Packit 7cfc04
if successful.
Packit 7cfc04
.SH ERRORS
Packit 7cfc04
The
Packit 7cfc04
\fIposix_trace_eventid_get_name\fR()
Packit 7cfc04
and
Packit 7cfc04
\fIposix_trace_trid_eventid_open\fR()
Packit 7cfc04
functions shall fail if:
Packit 7cfc04
.TP
Packit 7cfc04
.BR EINVAL
Packit 7cfc04
The
Packit 7cfc04
.IR trid
Packit 7cfc04
argument was not a valid trace stream identifier.
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
\fIposix_trace_trid_eventid_open\fR()
Packit 7cfc04
function shall fail if:
Packit 7cfc04
.TP
Packit 7cfc04
.BR ENAMETOOLONG
Packit 7cfc04
.br
Packit 7cfc04
The size of the name pointed to by the
Packit 7cfc04
.IR event_name
Packit 7cfc04
argument was longer than the implementation-defined value
Packit 7cfc04
{TRACE_EVENT_NAME_MAX}.
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
\fIposix_trace_eventid_get_name\fR()
Packit 7cfc04
function shall fail if:
Packit 7cfc04
.TP
Packit 7cfc04
.BR EINVAL
Packit 7cfc04
The trace event type identifier
Packit 7cfc04
.IR event
Packit 7cfc04
was not associated with any name.
Packit 7cfc04
.LP
Packit 7cfc04
.IR "The following sections are informative."
Packit 7cfc04
.SH EXAMPLES
Packit 7cfc04
None.
Packit 7cfc04
.SH "APPLICATION USAGE"
Packit 7cfc04
None.
Packit 7cfc04
.SH RATIONALE
Packit 7cfc04
None.
Packit 7cfc04
.SH "FUTURE DIRECTIONS"
Packit 7cfc04
The
Packit 7cfc04
\fIposix_trace_eventid_equal\fR(),
Packit 7cfc04
\fIposix_trace_eventid_get_name\fR(),
Packit 7cfc04
and
Packit 7cfc04
\fIposix_trace_trid_eventid_open\fR()
Packit 7cfc04
functions may be removed in a future version.
Packit 7cfc04
.SH "SEE ALSO"
Packit 7cfc04
.ad l
Packit 7cfc04
.IR "Table 2-7" ", " "Trace Option: User Trace Event",
Packit 7cfc04
.IR "\fIexec\fR\^",
Packit 7cfc04
.IR "\fIposix_trace_event\fR\^(\|)",
Packit 7cfc04
.IR "\fIposix_trace_getnext_event\fR\^(\|)"
Packit 7cfc04
.ad b
Packit 7cfc04
.P
Packit 7cfc04
The Base Definitions volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "\fB<trace.h>\fP"
Packit 7cfc04
.SH COPYRIGHT
Packit 7cfc04
Portions of this text are reprinted and reproduced in electronic form
Packit 7cfc04
from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
Packit 7cfc04
-- Portable Operating System Interface (POSIX), The Open Group Base
Packit 7cfc04
Specifications Issue 7, Copyright (C) 2013 by the Institute of
Packit 7cfc04
Electrical and Electronics Engineers, Inc and The Open Group.
Packit 7cfc04
(This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
Packit 7cfc04
event of any discrepancy between this version and the original IEEE and
Packit 7cfc04
The Open Group Standard, the original IEEE and The Open Group Standard
Packit 7cfc04
is the referee document. The original Standard can be obtained online at
Packit 7cfc04
http://www.unix.org/online.html .
Packit 7cfc04
Packit 7cfc04
Any typographical or formatting errors that appear
Packit 7cfc04
in this page are most likely
Packit 7cfc04
to have been introduced during the conversion of the source files to
Packit 7cfc04
man page format. To report such errors, see
Packit 7cfc04
https://www.kernel.org/doc/man-pages/reporting_bugs.html .