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

NAME

6       posix_trace_clear - clear trace stream and trace log (TRACING)
7

SYNOPSIS

9       #include <sys/types.h>
10       #include <trace.h>
11
12       int posix_trace_clear(trace_id_t trid);
13
14

DESCRIPTION

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

RETURN VALUE

51       Upon  successful  completion,  the  posix_trace_clear()  function shall
52       return a value of zero. Otherwise, it shall  return  the  corresponding
53       error number.
54

ERRORS

56       The posix_trace_clear() function shall fail if:
57
58       EINVAL The  value of the trid argument does not correspond to an active
59              trace stream.
60
61
62       The following sections are informative.
63

EXAMPLES

65       None.
66

APPLICATION USAGE

68       None.
69

RATIONALE

71       None.
72

FUTURE DIRECTIONS

74       None.
75

SEE ALSO

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