1POSIX_TRACE_CLEAR(3P)      POSIX Programmer's Manual     POSIX_TRACE_CLEAR(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_clear - clear trace stream and trace log (TRACING)
13

SYNOPSIS

15       #include <sys/types.h>
16       #include <trace.h>
17
18       int posix_trace_clear(trace_id_t trid);
19
20

DESCRIPTION

22       The posix_trace_clear() function shall reinitialize  the  trace  stream
23       identified  by  the  argument  trid  as  if  it were returning from the
24       posix_trace_create() function, except that the same allocated resources
25       shall  be  reused, the mapping of trace event type identifiers to trace
26       event names shall be unchanged,  and  the  trace  stream  status  shall
27       remain unchanged (that is, if it was running, it remains running and if
28       it was suspended, it remains suspended).
29
30       All trace events in the  trace  stream  recorded  before  the  call  to
31       posix_trace_clear()  shall be lost. The posix_stream_full_status status
32       shall be set to POSIX_TRACE_NOT_FULL.  There is no guarantee  that  all
33       trace  events  that  occurred  during  the posix_trace_clear() call are
34       recorded; the behavior with respect to trace points that may occur dur‐
35       ing this call is unspecified.
36
37       If the Trace Log option is supported and the trace stream has been cre‐
38       ated with a log, the posix_trace_clear()  function  shall  reinitialize
39       the trace stream with the same behavior as if the trace stream was cre‐
40       ated without the log, plus it shall reinitialize the trace log  associ‐
41       ated  with  the  trace  stream identified by the argument trid as if it
42       were returning from the posix_trace_create_withlog()  function,  except
43       that the same allocated resources, for the trace log, may be reused and
44       the associated trace stream status remains unchanged. The  first  trace
45       event  recorded  in the trace log after the call to posix_trace_clear()
46       shall be the same as the first trace event recorded in the active trace
47       stream  after the call to posix_trace_clear().  The posix_log_full_sta‐
48       tus status shall be set to POSIX_TRACE_NOT_FULL. There is no  guarantee
49       that all trace events that occurred during the posix_trace_clear() call
50       are recorded in the trace log;  the  behavior  with  respect  to  trace
51       points  that may occur during this call is unspecified. If the log full
52       policy is POSIX_TRACE_APPEND, the effect of a call to this function  is
53       unspecified  for the trace log associated with the trace stream identi‐
54       fied by the trid argument.
55

RETURN VALUE

57       Upon successful  completion,  the  posix_trace_clear()  function  shall
58       return  a  value  of zero. Otherwise, it shall return the corresponding
59       error number.
60

ERRORS

62       The posix_trace_clear() function shall fail if:
63
64       EINVAL The value of the trid argument does not correspond to an  active
65              trace stream.
66
67
68       The following sections are informative.
69

EXAMPLES

71       None.
72

APPLICATION USAGE

74       None.
75

RATIONALE

77       None.
78

FUTURE DIRECTIONS

80       None.
81

SEE ALSO

83       posix_trace_attr_init(),   posix_trace_create(),   posix_trace_flush(),
84       posix_trace_get_attr(),    the    Base    Definitions     volume     of
85       IEEE Std 1003.1-2001, <sys/types.h>, <trace.h>
86
88       Portions  of  this text are reprinted and reproduced in electronic form
89       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
90       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
91       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
92       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
93       event of any discrepancy between this version and the original IEEE and
94       The  Open Group Standard, the original IEEE and The Open Group Standard
95       is the referee document. The original Standard can be  obtained  online
96       at http://www.opengroup.org/unix/online.html .
97
98
99
100IEEE/The Open Group                  2003                POSIX_TRACE_CLEAR(3P)
Impressum