POSIX_TRACE_EVENTID_EQUAL(3)POSIX Programmer's ManuaPlOSIX_TRACE_EVENTID_EQUAL(3)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.

NNAAMMEE
       posix_trace_eventid_equal, posix_trace_eventid_get_name,
       posix_trace_trid_eventid_open -- manipulate the trace event type
       identifier (TTRRAACCIINNGG)

SSYYNNOOPPSSIISS
       #include <trace.h>

       int posix_trace_eventid_equal(trace_id_t _t_r_i_d, trace_event_id_t _e_v_e_n_t_1,
           trace_event_id_t _e_v_e_n_t_2);
       int posix_trace_eventid_get_name(trace_id_t _t_r_i_d,
           trace_event_id_t _e_v_e_n_t, char *_e_v_e_n_t___n_a_m_e);
       int posix_trace_trid_eventid_open(trace_id_t _t_r_i_d,
           const char *restrict _e_v_e_n_t___n_a_m_e,
           trace_event_id_t *restrict _e_v_e_n_t);

DDEESSCCRRIIPPTTIIOONN
       The _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t_i_d___e_q_u_a_l() function shall compare the trace event
       type identifiers _e_v_e_n_t_1 and _e_v_e_n_t_2 from the same trace stream or the
       same trace log identified by the _t_r_i_d argument. If the trace event type
       identifiers _e_v_e_n_t_1 and _e_v_e_n_t_2 are from different trace streams, the
       return value shall be unspecified.

       The _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t_i_d___g_e_t___n_a_m_e() function shall return, in the
       argument pointed to by _e_v_e_n_t___n_a_m_e, the trace event name associated with
       the trace event type identifier identified by the argument _e_v_e_n_t, for
       the trace stream or for the trace log identified by the _t_r_i_d argument.
       The name of the trace event shall have a maximum of
       {TRACE_EVENT_NAME_MAX} characters (which has the minimum value
       {_POSIX_TRACE_EVENT_NAME_MAX}).  Successive calls to this function with
       the same trace event type identifier and the same trace stream
       identifier shall return the same event name.

       The _p_o_s_i_x___t_r_a_c_e___t_r_i_d___e_v_e_n_t_i_d___o_p_e_n() function shall associate a user
       trace event name with a trace event type identifier for a given trace
       stream. The trace stream is identified by the _t_r_i_d argument, and it
       shall be an active trace stream. The trace event name is the string
       pointed to by the argument _e_v_e_n_t___n_a_m_e.  It shall have a maximum of
       {TRACE_EVENT_NAME_MAX} characters (which has the minimum value
       {_POSIX_TRACE_EVENT_NAME_MAX}).  The number of user trace event type
       identifiers that can be defined for any given process is limited by the
       maximum value {TRACE_USER_EVENT_MAX}, which has the minimum value
       {_POSIX_TRACE_USER_EVENT_MAX}.

       If the Trace Inherit option is not supported, the
       _p_o_s_i_x___t_r_a_c_e___t_r_i_d___e_v_e_n_t_i_d___o_p_e_n() function shall associate the user trace
       event name pointed to by the _e_v_e_n_t___n_a_m_e argument with a trace event
       type identifier that is unique for the process being traced in the
       trace stream identified by the _t_r_i_d argument, and is returned in the
       variable pointed to by the _e_v_e_n_t argument. If the user trace event name
       has already been mapped for the traced process, then the previously
       assigned trace event type identifier shall be returned. If the per-
       process user trace event name limit represented by
       {TRACE_USER_EVENT_MAX} has been reached, the pre-defined
       POSIX_TRACE_UNNAMED_USEREVENT (see _T_a_b_l_e _2_-_7, _T_r_a_c_e _O_p_t_i_o_n_: _U_s_e_r _T_r_a_c_e
       _E_v_e_n_t) user trace event shall be returned.

       If the Trace Inherit option is supported, the
       _p_o_s_i_x___t_r_a_c_e___t_r_i_d___e_v_e_n_t_i_d___o_p_e_n() function shall associate the user trace
       event name pointed to by the _e_v_e_n_t___n_a_m_e argument with a trace event
       type identifier that is unique for all the processes being traced in
       the trace stream identified by the _t_r_i_d argument, and is returned in
       the variable pointed to by the _e_v_e_n_t argument. If the user trace event
       name has already been mapped for the traced processes, then the
       previously assigned trace event type identifier shall be returned. If
       the per-process user trace event name limit represented by
       {TRACE_USER_EVENT_MAX} has been reached, the pre-defined
       POSIX_TRACE_UNNAMED_USEREVENT (see _T_a_b_l_e _2_-_7, _T_r_a_c_e _O_p_t_i_o_n_: _U_s_e_r _T_r_a_c_e
       _E_v_e_n_t) user trace event shall be returned.

RREETTUURRNN VVAALLUUEE
       Upon successful completion, the _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t_i_d___g_e_t___n_a_m_e() and
       _p_o_s_i_x___t_r_a_c_e___t_r_i_d___e_v_e_n_t_i_d___o_p_e_n() functions shall return a value of zero.
       Otherwise, they shall return the corresponding error number.

       The _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t_i_d___e_q_u_a_l() function shall return a non-zero value
       if _e_v_e_n_t_1 and _e_v_e_n_t_2 are equal; otherwise, a value of zero shall be
       returned. No errors are defined. If either _e_v_e_n_t_1 or _e_v_e_n_t_2 are not
       valid trace event type identifiers for the trace stream specified by
       _t_r_i_d or if the _t_r_i_d is invalid, the behavior shall be unspecified.

       The _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t_i_d___g_e_t___n_a_m_e() function stores the trace event name
       value in the object pointed to by _e_v_e_n_t___n_a_m_e, if successful.

       The _p_o_s_i_x___t_r_a_c_e___t_r_i_d___e_v_e_n_t_i_d___o_p_e_n() function stores the trace event
       type identifier value in the object pointed to by _e_v_e_n_t, if successful.

EERRRROORRSS
       The _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t_i_d___g_e_t___n_a_m_e() and _p_o_s_i_x___t_r_a_c_e___t_r_i_d___e_v_e_n_t_i_d___o_p_e_n()
       functions shall fail if:

       EEIINNVVAALL The _t_r_i_d argument was not a valid trace stream identifier.

       The _p_o_s_i_x___t_r_a_c_e___t_r_i_d___e_v_e_n_t_i_d___o_p_e_n() function shall fail if:

       EENNAAMMEETTOOOOLLOONNGG
              The size of the name pointed to by the _e_v_e_n_t___n_a_m_e argument was
              longer than the implementation-defined value
              {TRACE_EVENT_NAME_MAX}.

       The _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t_i_d___g_e_t___n_a_m_e() function shall fail if:

       EEIINNVVAALL The trace event type identifier _e_v_e_n_t was not associated with
              any name.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

EEXXAAMMPPLLEESS
       None.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       None.

RRAATTIIOONNAALLEE
       None.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       The _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t_i_d___e_q_u_a_l(), _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t_i_d___g_e_t___n_a_m_e(), and
       _p_o_s_i_x___t_r_a_c_e___t_r_i_d___e_v_e_n_t_i_d___o_p_e_n() functions may be removed in a future
       version.

SSEEEE AALLSSOO
       _T_a_b_l_e _2_-_7, _T_r_a_c_e _O_p_t_i_o_n_: _U_s_e_r _T_r_a_c_e _E_v_e_n_t, _e_x_e_c, _p_o_s_i_x___t_r_a_c_e___e_v_e_n_t(),
       _p_o_s_i_x___t_r_a_c_e___g_e_t_n_e_x_t___e_v_e_n_t()

       The Base Definitions volume of POSIX.1-2017, <<ttrraaccee..hh>>

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1-2017, Standard for Information Technology --
       Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the
       Institute of Electrical and Electronics Engineers, Inc and The Open
       Group.  In the event of any discrepancy between this version and the
       original IEEE and The Open Group Standard, the original IEEE and The
       Open Group Standard is the referee document. The original Standard can
       be obtained online at http://www.opengroup.org/unix/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2017         POSIX_TRACE_EVENTID_EQUAL(3)
