POSIX_T...ID_EQUAL(3POSIX)
π posix_trace_eventid_equal, posix_trace_eventid_get_name, posix_trace_trid_eventid_open π
okay bestie, so this is a page from the POSIX Programmer's Manual β yeah, the whole POSIX Programmer's Manual, we're fancy now. π
β οΈ heads up: the Linux implementation of this interface may differ (so go check the corresponding Linux manual page for the deets on Linux behavior), or honestly the interface may not even be implemented on Linux at all. no cap.
β¨ PROLOG β¨
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
πΈ NAME πΈ
posix_trace_eventid_equal, posix_trace_eventid_get_name, posix_trace_trid_eventid_open β manipulating the trace event type identifier, which is a TRACING thing, iykyk π¦
β¨ SYNOPSIS β¨
okay so here's the vibe, literally just this:
#include <trace.h>
int posix_trace_eventid_equal(trace_id_t trid, trace_event_id_t event1,
trace_event_id_t event2);
int posix_trace_eventid_get_name(trace_id_t trid,
trace_event_id_t event, char *event_name);
int posix_trace_trid_eventid_open(trace_id_t trid,
const char *restrict event_name,
trace_event_id_t *restrict event);
π DESCRIPTION π
posix_trace_eventid_equal()
So this one compares the trace event type identifiers event1 and event2 β and they gotta be from the same trace stream or the same trace log, the one identified by the trid argument. periodt.
π¨ but ifevent1andevent2are from different trace streams? the return value shall be unspecified. we don't make the rules bestie.
posix_trace_eventid_get_name()
This one returns, in the argument pointed to by event_name, the trace event name associated with the trace event type identifier identified by the argument event β for the trace stream, or for the trace log, identified by the trid 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}). and like β successive calls to this function with the same trace event type identifier and the same trace stream identifier shall return the same event name. consistency queen π
posix_trace_trid_eventid_open()
This one 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 trid argument, and it shall be an active trace stream, no sleeping on the job. π€
The trace event name is the string pointed to by the argument event_name. 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
posix_trace_trid_eventid_open() shall associate the user trace event name pointed to by the event_name argument with a trace event type identifier that is unique for the process being traced in the trace stream identified by the trid argument, and it's returned in the variable pointed to by the event 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 Table 2-7, Trace Option: User Trace Event) user trace event shall be returned.
π if the Trace Inherit option IS supported
posix_trace_trid_eventid_open() shall associate the user trace event name pointed to by the event_name argument with a trace event type identifier that is unique for all the processes being traced in the trace stream identified by the trid argument, and it's returned in the variable pointed to by the event 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 Table 2-7, Trace Option: User Trace Event) user trace event shall be returned.
π₯ RETURN VALUE π₯
Upon successful completion, the posix_trace_eventid_get_name() and posix_trace_trid_eventid_open() functions shall return a value of zero. Otherwise, they shall return the corresponding error number. (we love a clean zero β¨)
The posix_trace_eventid_equal() function shall return a non-zero value if event1 and event2 are equal; otherwise, a value of zero shall be returned. No errors are defined. π
π¨ but if eitherevent1orevent2are not valid trace event type identifiers for the trace stream specified bytrid, or if thetridis invalid, the behavior shall be unspecified. so likeβ¦ don't.
The posix_trace_eventid_get_name() function stores the trace event name value in the object pointed to by event_name, if successful. π
The posix_trace_trid_eventid_open() function stores the trace event type identifier value in the object pointed to by event, if successful. π
π ERRORS π
The posix_trace_eventid_get_name() and posix_trace_trid_eventid_open() functions shall fail if:
EINVALβ Thetridargument was not a valid trace stream identifier. π
The posix_trace_trid_eventid_open() function shall fail if:
ENAMETOOLONGβ The size of the name pointed to by theevent_nameargument was longer than the implementation-defined value{TRACE_EVENT_NAME_MAX}. that name was doing too much fr fr π
The posix_trace_eventid_get_name() function shall fail if:
EINVALβ The trace event type identifiereventwas not associated with any name. namelessβ¦ it's giving mysterious π»
π The following sections are informative.
π EXAMPLES π
None. (yes bestie, that's literally it π)
π APPLICATION USAGE π
None. (same energy, nothing here π«Ά)
π§ RATIONALE π§
None. (the rationale said "no thoughts, head empty" π)
β FUTURE DIRECTIONS β
The posix_trace_eventid_equal(), posix_trace_eventid_get_name(), and posix_trace_trid_eventid_open() functions may be removed in a future version. so likeβ¦ enjoy them while they're here π
π SEE ALSO π
- Table 2-7, Trace Option: User Trace Event
execposix_trace_event()posix_trace_getnext_event()
and from The Base Definitions volume of POSIX.1β2017: <trace.h> π
π COPYRIGHT π
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 .
okay that's the whole page bestie, ily, go forth and trace responsibly π β¨ β this was brought to you by IEEE/The Open Group, dated 2017, filed under POSIX_T...ID_EQUAL(3POSIX) π¦πΈ
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms