Files
oldlinux-files/Ref-docs/POSIX/susv3/functions/posix_trace_eventset_add.html
2024-02-19 00:21:47 -05:00

170 lines
6.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
<title>posix_trace_eventset_add</title>
</head>
<body bgcolor="white">
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
</script>
<basefont size="3"> <a name="posix_trace_eventset_add"></a> <a name="tag_03_466"></a><!-- posix_trace_eventset_add -->
<!--header start-->
<center><font size="2">The Open Group Base Specifications Issue 6<br>
IEEE Std 1003.1-2001<br>
Copyright &copy; 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
<!--header end-->
<hr size="2" noshade>
<h4><a name="tag_03_466_01"></a>NAME</h4>
<blockquote>posix_trace_eventset_add, posix_trace_eventset_del, posix_trace_eventset_empty, posix_trace_eventset_fill,
posix_trace_eventset_ismember - manipulate trace event type sets (<b>TRACING</b>)</blockquote>
<h4><a name="tag_03_466_02"></a>SYNOPSIS</h4>
<blockquote class="synopsis">
<div class="box"><code><tt><sup>[<a href="javascript:open_code('TRC TEF')">TRC TEF</a>]</sup> <img src="../images/opt-start.gif" alt=
"[Option Start]" border="0"> #include &lt;<a href="../basedefs/trace.h.html">trace.h</a>&gt;<br>
<br>
int posix_trace_eventset_add(trace_event_id_t</tt> <i>event_id</i><tt>,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; trace_event_set_t *</tt><i>set</i><tt>);<br>
int posix_trace_eventset_del(trace_event_id_t</tt> <i>event_id</i><tt>,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; trace_event_set_t *</tt><i>set</i><tt>);<br>
int posix_trace_eventset_empty(trace_event_set_t *</tt><i>set</i><tt>);<br>
int posix_trace_eventset_fill(trace_event_set_t *</tt><i>set</i><tt>, int</tt> <i>what</i><tt>);<br>
int posix_trace_eventset_ismember(trace_event_id_t</tt> <i>event_id</i><tt>,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const trace_event_set_t *restrict</tt> <i>set</i><tt>, int *restrict</tt>
<i>ismember</i><tt>); <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div>
<tt><br>
</tt></blockquote>
<h4><a name="tag_03_466_03"></a>DESCRIPTION</h4>
<blockquote>
<p>These primitives manipulate sets of trace event types. They operate on data objects addressable by the application, not on the
current trace event filter of any trace stream.</p>
<p>The <i>posix_trace_eventset_add</i>() and <i>posix_trace_eventset_del</i>() functions, respectively, shall add or delete the
individual trace event type specified by the value of the argument <i>event_id</i> to or from the trace event type set pointed to
by the argument <i>set</i>. Adding a trace event type already in the set or deleting a trace event type not in the set shall not be
considered an error.</p>
<p>The <i>posix_trace_eventset_empty</i>() function shall initialize the trace event type set pointed to by the <i>set</i> argument
such that all trace event types defined, both system and user, shall be excluded from the set.</p>
<p>The <i>posix_trace_eventset_fill</i>() function shall initialize the trace event type set pointed to by the argument <i>set</i>,
such that the set of trace event types defined by the argument <i>what</i> shall be included in the set. The value of the argument
<i>what</i> shall consist of one of the following values, as defined in the <a href=
"../basedefs/trace.h.html"><i>&lt;trace.h&gt;</i></a> header:</p>
<dl compact>
<dt>POSIX_TRACE_WOPID_EVENTS</dt>
<dd><br>
All the process-independent implementation-defined system trace event types are included in the set.</dd>
<dt>POSIX_TRACE_SYSTEM_EVENTS</dt>
<dd><br>
All the implementation-defined system trace event types are included in the set, as are those defined in
IEEE&nbsp;Std&nbsp;1003.1-2001.</dd>
<dt>POSIX_TRACE_ALL_EVENTS</dt>
<dd><br>
All trace event types defined, both system and user, are included in the set.</dd>
</dl>
<p>Applications shall call either <i>posix_trace_eventset_empty</i>() or <i>posix_trace_eventset_fill</i>() at least once for each
object of type <b>trace_event_set_t</b> prior to any other use of that object. If such an object is not initialized in this way,
but is nonetheless supplied as an argument to any of the <i>posix_trace_eventset_add</i>(), <i>posix_trace_eventset_del</i>(), or
<i>posix_trace_eventset_ismember</i>() functions, the results are undefined.</p>
<p>The <i>posix_trace_eventset_ismember</i>() function shall test whether the trace event type specified by the value of the
argument <i>event_id</i> is a member of the set pointed to by the argument <i>set</i>. The value returned in the object pointed to
by <i>ismember</i> argument is zero if the trace event type identifier is not a member of the set and a value different from zero
if it is a member of the set.</p>
</blockquote>
<h4><a name="tag_03_466_04"></a>RETURN VALUE</h4>
<blockquote>
<p>Upon successful completion, these functions shall return a value of zero. Otherwise, they shall return the corresponding error
number.</p>
</blockquote>
<h4><a name="tag_03_466_05"></a>ERRORS</h4>
<blockquote>
<p>These functions may fail if:</p>
<dl compact>
<dt>[EINVAL]</dt>
<dd>The value of one of the arguments is invalid.</dd>
</dl>
</blockquote>
<hr>
<div class="box"><em>The following sections are informative.</em></div>
<h4><a name="tag_03_466_06"></a>EXAMPLES</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_03_466_07"></a>APPLICATION USAGE</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_03_466_08"></a>RATIONALE</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_03_466_09"></a>FUTURE DIRECTIONS</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_03_466_10"></a>SEE ALSO</h4>
<blockquote>
<p><a href="posix_trace_set_filter.html"><i>posix_trace_set_filter</i>()</a> , <a href=
"posix_trace_trid_eventid_open.html"><i>posix_trace_trid_eventid_open</i>()</a> , the Base Definitions volume of
IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/trace.h.html"><i>&lt;trace.h&gt;</i></a></p>
</blockquote>
<h4><a name="tag_03_466_11"></a>CHANGE HISTORY</h4>
<blockquote>
<p>First released in Issue 6. Derived from IEEE&nbsp;Std&nbsp;1003.1q-2000.</p>
</blockquote>
<div class="box"><em>End of informative text.</em></div>
<hr>
<hr size="2" noshade>
<center><font size="2"><!--footer start-->
UNIX &reg; is a registered Trademark of The Open Group.<br>
POSIX &reg; is a registered Trademark of The IEEE.<br>
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
]</font></center>
<!--footer end-->
<hr size="2" noshade>
</body>
</html>