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

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       posix_trace_close, posix_trace_open,  posix_trace_rewind  -  trace  log
13       management (TRACING)
14

SYNOPSIS

16       #include <trace.h>
17
18       int posix_trace_close(trace_id_t trid);
19       int posix_trace_open(int file_desc, trace_id_t *trid);
20       int posix_trace_rewind(trace_id_t trid);
21
22

DESCRIPTION

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

RETURN VALUE

62       Upon  successful  completion,  these  functions shall return a value of
63       zero. Otherwise, they shall return the corresponding error number.
64
65       If successful, the posix_trace_open() function stores the trace  stream
66       identifier value in the object pointed to by trid.
67

ERRORS

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

EXAMPLES

87       None.
88

APPLICATION USAGE

90       None.
91

RATIONALE

93       None.
94

FUTURE DIRECTIONS

96       None.
97

SEE ALSO

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