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

169 lines
7.5 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_attr_getclockres</title>
</head>
<body bgcolor="white">
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
</script>
<basefont size="3"> <a name="posix_trace_attr_getclockres"></a> <a name="tag_03_448"></a><!-- posix_trace_attr_getclockres -->
<!--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_448_01"></a>NAME</h4>
<blockquote>posix_trace_attr_getclockres, posix_trace_attr_getcreatetime, posix_trace_attr_getgenversion, posix_trace_attr_getname,
posix_trace_attr_setname - retrieve and set information about a trace stream (<b>TRACING</b>)</blockquote>
<h4><a name="tag_03_448_02"></a>SYNOPSIS</h4>
<blockquote class="synopsis">
<div class="box"><code><tt><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../images/opt-start.gif" alt=
"[Option Start]" border="0"> #include &lt;<a href="../basedefs/time.h.html">time.h</a>&gt;<br>
#include &lt;<a href="../basedefs/trace.h.html">trace.h</a>&gt;<br>
<br>
int posix_trace_attr_getclockres(const trace_attr_t *</tt><i>attr</i><tt>,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct timespec *</tt><i>resolution</i><tt>);<br>
int posix_trace_attr_getcreatetime(const trace_attr_t *</tt><i>attr</i><tt>,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct timespec *</tt><i>createtime</i><tt>);<br>
<br>
<br>
#include &lt;<a href="../basedefs/trace.h.html">trace.h</a>&gt;<br>
int posix_trace_attr_getgenversion(const trace_attr_t *</tt><i>attr</i><tt>,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char *</tt><i>genversion</i><tt>);<br>
int posix_trace_attr_getname(const trace_attr_t *</tt><i>attr</i><tt>,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char *</tt><i>tracename</i><tt>);<br>
int posix_trace_attr_setname(trace_attr_t *</tt><i>attr</i><tt>,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const char *</tt><i>tracename</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_448_03"></a>DESCRIPTION</h4>
<blockquote>
<p>The <i>posix_trace_attr_getclockres</i>() function shall copy the clock resolution of the clock used to generate timestamps from
the <i>clock-resolution</i> attribute of the attributes object pointed to by the <i>attr</i> argument into the structure pointed to
by the <i>resolution</i> argument.</p>
<p>The <i>posix_trace_attr_getcreatetime</i>() function shall copy the trace stream creation time from the <i>creation-time</i>
attribute of the attributes object pointed to by the <i>attr</i> argument into the structure pointed to by the <i>createtime</i>
argument. The <i>creation-time</i> attribute shall represent the time of creation of the trace stream.</p>
<p>The <i>posix_trace_attr_getgenversion</i>() function shall copy the string containing version information from the
<i>generation-version</i> attribute of the attributes object pointed to by the <i>attr</i> argument into the string pointed to by
the <i>genversion</i> argument. The <i>genversion</i> argument shall be the address of a character array which can store at least
{TRACE_NAME_MAX} characters.</p>
<p>The <i>posix_trace_attr_getname</i>() function shall copy the string containing the trace name from the <i>trace-name</i>
attribute of the attributes object pointed to by the <i>attr</i> argument into the string pointed to by the <i>tracename</i>
argument. The <i>tracename</i> argument shall be the address of a character array which can store at least {TRACE_NAME_MAX}
characters.</p>
<p>The <i>posix_trace_attr_setname</i>() function shall set the name in the <i>trace-name</i> attribute of the attributes object
pointed to by the <i>attr</i> argument, using the trace name string supplied by the <i>tracename</i> argument. If the supplied
string contains more than {TRACE_NAME_MAX} characters, the name copied into the <i>trace-name</i> attribute may be truncated to one
less than the length of {TRACE_NAME_MAX} characters. The default value is a null string.</p>
</blockquote>
<h4><a name="tag_03_448_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>
<p>If successful, the <i>posix_trace_attr_getclockres</i>() function stores the <i>clock-resolution</i> attribute value in the
object pointed to by <i>resolution</i>. Otherwise, the content of this object is unspecified.</p>
<p>If successful, the <i>posix_trace_attr_getcreatetime</i>() function stores the trace stream creation time in the object pointed
to by <i>createtime</i>. Otherwise, the content of this object is unspecified.</p>
<p>If successful, the <i>posix_trace_attr_getgenversion</i>() function stores the trace version information in the string pointed
to by <i>genversion</i>. Otherwise, the content of this string is unspecified.</p>
<p>If successful, the <i>posix_trace_attr_getname</i>() function stores the trace name in the string pointed to by
<i>tracename</i>. Otherwise, the content of this string is unspecified.</p>
</blockquote>
<h4><a name="tag_03_448_05"></a>ERRORS</h4>
<blockquote>
<p>The <i>posix_trace_attr_getclockres</i>(), <i>posix_trace_attr_getcreatetime</i>(), <i>posix_trace_attr_getgenversion</i>(), and
<i>posix_trace_attr_getname</i>() functions may fail if:</p>
<dl compact>
<dt>[EINVAL]</dt>
<dd>The value specified by 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_448_06"></a>EXAMPLES</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_03_448_07"></a>APPLICATION USAGE</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_03_448_08"></a>RATIONALE</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_03_448_09"></a>FUTURE DIRECTIONS</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_03_448_10"></a>SEE ALSO</h4>
<blockquote>
<p><a href="posix_trace_attr_init.html"><i>posix_trace_attr_init</i>()</a> , <a href=
"posix_trace_create.html"><i>posix_trace_create</i>()</a> , <a href="posix_trace_get_attr.html"><i>posix_trace_get_attr</i>()</a> ,
<a href="uname.html"><i>uname</i>()</a> , the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href=
"../basedefs/time.h.html"><i>&lt;time.h&gt;</i></a>, <a href="../basedefs/trace.h.html"><i>&lt;trace.h&gt;</i></a></p>
</blockquote>
<h4><a name="tag_03_448_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>