1
by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages. |
1 |
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved |
2
by Francesco Paolo Lovergine
* Alligned to linux main manpages edition. |
2 |
.TH "POSIX_TRACE_EVENTID_EQUAL" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual" |
1
by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages. |
3 |
.\" posix_trace_eventid_equal |
4 |
.SH NAME |
|
5 |
posix_trace_eventid_equal, posix_trace_eventid_get_name, posix_trace_trid_eventid_open |
|
6 |
\- manipulate the trace event
|
|
7 |
type identifier (\fBTRACING\fP) |
|
8 |
.SH SYNOPSIS |
|
9 |
.LP
|
|
10 |
\fB#include <trace.h>
|
|
11 |
.br
|
|
12 |
.sp
|
|
13 |
int posix_trace_eventid_equal(trace_id_t\fP \fItrid\fP\fB, trace_event_id_t\fP |
|
14 |
\fIevent1\fP\fB, |
|
15 |
.br
|
|
16 |
\ \ \ \ \ \ trace_event_id_t\fP \fIevent2\fP\fB); |
|
17 |
.br
|
|
18 |
int posix_trace_eventid_get_name(trace_id_t\fP \fItrid\fP\fB, |
|
19 |
.br
|
|
20 |
\ \ \ \ \ \ trace_event_id_t\fP \fIevent\fP\fB, char *\fP\fIevent_name\fP\fB); |
|
21 |
.br
|
|
22 |
\fP
|
|
23 |
.LP
|
|
24 |
\fBint posix_trace_trid_eventid_open(trace_id_t\fP \fItrid\fP\fB, |
|
25 |
.br
|
|
26 |
\ \ \ \ \ \ const char *restrict\fP \fIevent_name\fP\fB, |
|
27 |
.br
|
|
28 |
\ \ \ \ \ \ trace_event_id_t *restrict\fP \fIevent\fP\fB); \fP |
|
29 |
\fB
|
|
30 |
.br
|
|
31 |
\fP
|
|
32 |
.SH DESCRIPTION |
|
33 |
.LP
|
|
34 |
The \fIposix_trace_eventid_equal\fP() function shall compare the trace |
|
35 |
event type identifiers \fIevent1\fP and \fIevent2\fP |
|
36 |
from the same trace stream or the same trace log identified by the |
|
37 |
\fItrid\fP argument. If the trace event type identifiers |
|
38 |
\fIevent1\fP and \fIevent2\fP are from different trace streams, the |
|
39 |
return value shall be unspecified. |
|
40 |
.LP
|
|
41 |
The \fIposix_trace_eventid_get_name\fP() function shall return, in |
|
42 |
the argument pointed to by \fIevent_name\fP, the trace |
|
43 |
event name associated with the trace event type identifier identified |
|
44 |
by the argument \fIevent\fP, for the trace stream or for the |
|
45 |
trace log identified by the \fItrid\fP argument. The name of the trace |
|
46 |
event shall have a maximum of {TRACE_EVENT_NAME_MAX} |
|
47 |
characters (which has the minimum value {_POSIX_TRACE_EVENT_NAME_MAX}). |
|
48 |
Successive calls to this function with the same trace event |
|
49 |
type identifier and the same trace stream identifier shall return |
|
50 |
the same event name. |
|
51 |
.LP
|
|
52 |
The \fIposix_trace_trid_eventid_open\fP() function shall associate |
|
53 |
a user trace event name with a trace event type identifier for |
|
54 |
a given trace stream. The trace stream is identified by the \fItrid\fP |
|
55 |
argument, and it shall be an active trace stream. The trace |
|
56 |
event name is the string pointed to by the argument \fIevent_name\fP. |
|
57 |
It shall have a maximum of {TRACE_EVENT_NAME_MAX} characters |
|
58 |
(which has the minimum value {_POSIX_TRACE_EVENT_NAME_MAX}). The number |
|
59 |
of user trace event type identifiers that can be defined |
|
60 |
for any given process is limited by the maximum value {TRACE_USER_EVENT_MAX}, |
|
61 |
which has the minimum value |
|
62 |
{_POSIX_TRACE_USER_EVENT_MAX}. |
|
63 |
.LP
|
|
64 |
If the Trace Inherit option is not supported, the \fIposix_trace_trid_eventid_open\fP() |
|
65 |
function shall associate the user trace |
|
66 |
event name pointed to by the \fIevent_name\fP argument with a trace |
|
67 |
event type identifier that is unique for the process being |
|
68 |
traced in the trace stream identified by the \fItrid\fP argument, |
|
69 |
and is returned in the variable pointed to by the \fIevent\fP |
|
70 |
argument. If the user trace event name has already been mapped for |
|
71 |
the traced process, then the previously assigned trace event |
|
72 |
type identifier shall be returned. If the per-process user trace event |
|
73 |
name limit represented by {TRACE_USER_EVENT_MAX} has been |
|
74 |
reached, the pre-defined POSIX_TRACE_UNNAMED_USEREVENT (see \fITrace
|
|
75 |
Option: User Trace |
|
76 |
Event\fP ) user trace event shall be returned.
|
|
77 |
.LP
|
|
78 |
If the Trace Inherit option is supported, the \fIposix_trace_trid_eventid_open\fP() |
|
79 |
function shall associate the user |
|
80 |
trace event name pointed to by the \fIevent_name\fP argument with |
|
81 |
a trace event type identifier that is unique for all the |
|
82 |
processes being traced in the trace stream identified by the \fItrid\fP |
|
83 |
argument, and is returned in the variable pointed to by |
|
84 |
the \fIevent\fP argument. If the user trace event name has already |
|
85 |
been mapped for the traced processes, then the previously |
|
86 |
assigned trace event type identifier shall be returned. If the per-process |
|
87 |
user trace event name limit represented by |
|
88 |
{TRACE_USER_EVENT_MAX} has been reached, the pre-defined POSIX_TRACE_UNNAMED_USEREVENT |
|
89 |
(see \fITrace Option: User Trace Event\fP ) user trace event shall |
|
90 |
be returned. |
|
91 |
.SH RETURN VALUE |
|
92 |
.LP
|
|
93 |
Upon successful completion, the \fIposix_trace_eventid_get_name\fP() |
|
94 |
and |
|
95 |
\fIposix_trace_trid_eventid_open\fP() functions shall return a |
|
96 |
value of zero. Otherwise, they shall return the corresponding error |
|
97 |
number. |
|
98 |
.LP
|
|
99 |
The \fIposix_trace_eventid_equal\fP() function shall return a non-zero |
|
100 |
value if \fIevent1\fP and \fIevent2\fP are equal; |
|
101 |
otherwise, a value of zero shall be returned. No errors are defined. |
|
102 |
If either \fIevent1\fP or \fIevent2\fP are not valid trace |
|
103 |
event type identifiers for the trace stream specified by \fItrid\fP |
|
104 |
or if the \fItrid\fP is invalid, the behavior shall be |
|
105 |
unspecified. |
|
106 |
.LP
|
|
107 |
The \fIposix_trace_eventid_get_name\fP() function stores the trace |
|
108 |
event name value in the object pointed to by |
|
109 |
\fIevent_name\fP, if successful. |
|
110 |
.LP
|
|
111 |
The \fIposix_trace_trid_eventid_open\fP() function stores the trace |
|
112 |
event type identifier value in the object pointed to by |
|
113 |
\fIevent\fP, if successful. |
|
114 |
.SH ERRORS |
|
115 |
.LP
|
|
116 |
The \fIposix_trace_eventid_get_name\fP() and \fIposix_trace_trid_eventid_open\fP() |
|
117 |
functions shall fail if: |
|
118 |
.TP 7 |
|
119 |
.B EINVAL |
|
120 |
The \fItrid\fP argument was not a valid trace stream identifier. |
|
121 |
.sp
|
|
122 |
.LP
|
|
123 |
The \fIposix_trace_trid_eventid_open\fP() function shall fail if: |
|
124 |
.TP 7 |
|
125 |
.B ENAMETOOLONG |
|
126 |
.sp
|
|
127 |
The size of the name pointed to by the \fIevent_name\fP argument was |
|
128 |
longer than the implementation-defined value |
|
129 |
{TRACE_EVENT_NAME_MAX}. |
|
130 |
.sp
|
|
131 |
.LP
|
|
132 |
The \fIposix_trace_eventid_get_name\fP() function shall fail if: |
|
133 |
.TP 7 |
|
134 |
.B EINVAL |
|
135 |
The trace event type identifier \fIevent\fP was not associated with |
|
136 |
any name. |
|
137 |
.sp
|
|
138 |
.LP
|
|
139 |
\fIThe following sections are informative.\fP |
|
140 |
.SH EXAMPLES |
|
141 |
.LP
|
|
142 |
None. |
|
143 |
.SH APPLICATION USAGE |
|
144 |
.LP
|
|
145 |
None. |
|
146 |
.SH RATIONALE |
|
147 |
.LP
|
|
148 |
None. |
|
149 |
.SH FUTURE DIRECTIONS |
|
150 |
.LP
|
|
151 |
None. |
|
152 |
.SH SEE ALSO |
|
153 |
.LP
|
|
154 |
\fITrace Option: User Trace Event\fP , \fIposix_trace_event\fP() , |
|
155 |
\fIposix_trace_getnext_event\fP() , the Base Definitions volume of |
|
156 |
IEEE\ Std\ 1003.1-2001, \fI<trace.h>\fP |
|
157 |
.SH COPYRIGHT |
|
158 |
Portions of this text are reprinted and reproduced in electronic form |
|
159 |
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology |
|
160 |
-- Portable Operating System Interface (POSIX), The Open Group Base |
|
161 |
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of |
|
162 |
Electrical and Electronics Engineers, Inc and The Open Group. In the |
|
163 |
event of any discrepancy between this version and the original IEEE and |
|
164 |
The Open Group Standard, the original IEEE and The Open Group Standard |
|
165 |
is the referee document. The original Standard can be obtained online at |
|
166 |
http://www.opengroup.org/unix/online.html . |