summaryrefslogtreecommitdiffstats
path: root/man3p/posix_trace_get_status.3p
blob: 93bad5ea549dd743322eedff23935926bc1c1d97 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
.TH "POSIX_TRACE_GET_ATTR" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\" posix_trace_get_attr 
.SH NAME
posix_trace_get_attr, posix_trace_get_status \- retrieve the trace
attributes or trace status
(\fBTRACING\fP)
.SH SYNOPSIS
.LP
\fB#include <trace.h>
.br
.sp
int posix_trace_get_attr(trace_id_t\fP \fItrid\fP\fB, trace_attr_t
*\fP\fIattr\fP\fB);
.br
int posix_trace_get_status(trace_id_t\fP \fItrid\fP\fB,
.br
\ \ \ \ \ \  struct posix_trace_status_info *\fP\fIstatusinfo\fP\fB);
\fP
\fB
.br
\fP
.SH DESCRIPTION
.LP
The \fIposix_trace_get_attr\fP() function shall copy the attributes
of the active trace stream identified by \fItrid\fP into
the object pointed to by the \fIattr\fP argument.   If the Trace Log
option is supported, \fItrid\fP may represent a
pre-recorded trace log. 
.LP
The \fIposix_trace_get_status\fP() function shall return, in the structure
pointed to by the \fIstatusinfo\fP argument, the
current trace status for the trace stream identified by the \fItrid\fP
argument. These status values returned in the structure
pointed to by \fIstatusinfo\fP shall have been appropriately read
to ensure that the returned values are consistent.   \ If the
Trace Log option is supported and the \fItrid\fP argument refers to
a pre-recorded trace stream, the status shall be the status of
the completed trace stream. 
.LP
Each time the \fIposix_trace_get_status\fP() function is used, the
overrun status of the trace stream shall be reset to
POSIX_TRACE_NO_OVERRUN immediately after the call completes.   \ If
the Trace Log option is supported, the
\fIposix_trace_get_status\fP() function shall behave the same as when
the option is not supported except for the following
differences:
.IP " *" 3
If the \fItrid\fP argument refers to a trace stream with log, each
time the \fIposix_trace_get_status\fP() function is used,
the log overrun status of the trace stream shall be reset to POSIX_TRACE_NO_OVERRUN
and the \fIflush_error\fP status shall be
reset to zero immediately after the call completes.
.LP
.IP " *" 3
If the \fItrid\fP argument refers to a pre-recorded trace stream,
the status returned shall be the status of the completed
trace stream and the status values of the trace stream shall not be
reset.
.LP
.SH RETURN VALUE
.LP
Upon successful completion, these functions shall return a value of
zero. Otherwise, they shall return the corresponding error
number.
.LP
The \fIposix_trace_get_attr\fP() function stores the trace attributes
in the object pointed to by \fIattr\fP, if
successful.
.LP
The \fIposix_trace_get_status\fP() function stores the trace status
in the object pointed to by \fIstatusinfo\fP, if
successful.
.SH ERRORS
.LP
These functions shall fail if:
.TP 7
.B EINVAL
The trace stream argument \fItrid\fP does not correspond to a valid
active trace stream or a valid trace log.
.sp
.LP
\fIThe following sections are informative.\fP
.SH EXAMPLES
.LP
None.
.SH APPLICATION USAGE
.LP
None.
.SH RATIONALE
.LP
None.
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
\fIposix_trace_attr_destroy\fP() , \fIposix_trace_attr_init\fP() ,
\fIposix_trace_create\fP()
, \fIposix_trace_open\fP() , the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
\fI<trace.h>\fP
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 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 .