1POSIX_TRACE_CLOSE(P)       POSIX Programmer's Manual      POSIX_TRACE_CLOSE(P)
2
3
4

NAME

6       posix_trace_close,  posix_trace_open,  posix_trace_rewind  -  trace log
7       management (TRACING)
8

SYNOPSIS

10       #include <trace.h>
11
12       int posix_trace_close(trace_id_t trid);
13       int posix_trace_open(int file_desc, trace_id_t *trid);
14       int posix_trace_rewind(trace_id_t trid);
15
16

DESCRIPTION

18       The posix_trace_close() function shall deallocate the trace log identi‐
19       fier  indicated  by trid, and all of its associated resources. If there
20       is no valid trace log pointed to by the trid, this function shall fail.
21
22       The posix_trace_open() function shall allocate the necessary  resources
23       and  establish  the  connection  between  a trace log identified by the
24       file_desc argument and a trace  stream  identifier  identified  by  the
25       object  pointed  to by the trid argument. The file_desc argument should
26       be a valid open file descriptor that corresponds to a  trace  log.  The
27       file_desc  argument  shall be open for reading. The current trace event
28       timestamp, which specifies the timestamp of the trace event  that  will
29       be  read  by the next call to posix_trace_getnext_event(), shall be set
30       to the timestamp of the oldest trace event recorded in  the  trace  log
31       identified by trid.
32
33       The  posix_trace_open() function shall return a trace stream identifier
34       in the variable pointed to by the trid argument, that may only be  used
35       by the following functions:
36
37  posix_trace_close()                       posix_trace_get_attr()
38  posix_trace_eventid_equal()               posix_trace_get_status()
39  posix_trace_eventid_get_name()            posix_trace_getnext_event()
40  posix_trace_eventtypelist_getnext_id()    posix_trace_rewind()
41  posix_trace_eventtypelist_rewind()
42
43
44       In particular, notice that the operations normally used by a trace con‐
45       troller process, such as  posix_trace_start(),  posix_trace_stop(),  or
46       posix_trace_shutdown(),  cannot be invoked using the trace stream iden‐
47       tifier returned by the posix_trace_open() function.
48
49       The posix_trace_rewind() function shall reset the current  trace  event
50       timestamp,  which  specifies the timestamp of the trace event that will
51       be read by the next call to posix_trace_getnext_event(), to  the  time‐
52       stamp of the oldest trace event recorded in the trace log identified by
53       trid.
54

RETURN VALUE

56       Upon successful completion, these functions shall  return  a  value  of
57       zero. Otherwise, they shall return the corresponding error number.
58
59       If  successful, the posix_trace_open() function stores the trace stream
60       identifier value in the object pointed to by trid.
61

ERRORS

63       The posix_trace_open() function shall fail if:
64
65       EINTR  The operation was interrupted by a signal and thus no trace  log
66              was opened.
67
68       EINVAL The  object  pointed  to  by  file_desc does not correspond to a
69              valid trace log.
70
71
72       The posix_trace_close() and posix_trace_rewind() functions may fail if:
73
74       EINVAL The object pointed to by trid does not  correspond  to  a  valid
75              trace log.
76
77
78       The following sections are informative.
79

EXAMPLES

81       None.
82

APPLICATION USAGE

84       None.
85

RATIONALE

87       None.
88

FUTURE DIRECTIONS

90       None.
91

SEE ALSO

93       posix_trace_get_attr()  ,  posix_trace_get_filter()  , posix_trace_get‐
94       next_event() , the Base  Definitions  volume  of  IEEE Std 1003.1-2001,
95       <trace.h>
96
98       Portions  of  this text are reprinted and reproduced in electronic form
99       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
100       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
101       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
102       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
103       event of any discrepancy between this version and the original IEEE and
104       The  Open Group Standard, the original IEEE and The Open Group Standard
105       is the referee document. The original Standard can be  obtained  online
106       at http://www.opengroup.org/unix/online.html .
107
108
109
110IEEE/The Open Group                  2003                 POSIX_TRACE_CLOSE(P)
Impressum