Retrieves the stream full policy.
Posix Trace Library (libposixtrace.a)
#include <trace.h>
int posix_trace_attr_getstreamfullpolicy(attr,streampolicy)
const trace_attr_t *attr;
int *streampolicy;
The posix_trace_attr_getstreamfullpolicy subroutine gets the trace stream full policy stored in stream-full-policy attribute of the attr object.
Item | Description |
---|---|
POSIX_TRACE_LOOP | The trace stream loops until explicitly stopped by the posix_trace_stop subroutine. When the trace stream is full, the trace system reuses the resources allocated to the oldest trace events recorded. In this way, the trace stream always contains the most recent trace events that are recorded. |
POSIX_TRACE_UNTIL_FULL | The trace stream runs until the trace stream resources are exhausted. This condition can be deduced from the posix_stream_status and posix_stream_full_status (see the posix_trace_status_info structure defined in trace.h header file). When this trace stream is read, a POSIX_TRACE_STOP trace event is reported after the last recorded trace event. The trace system reuses the resources that are allocated to any reported trace events (see the posix_trace_getnext_event, posix_trace_trygetnext_event, and posix_trace_timedgetnext_event subroutines), or trace events that are flushed for an active trace stream with log. The trace system restarts the trace stream when 50 per cent of the buffer size is read. A POSIX_TRACE_START trace event is reported before reporting the next recorded trace event. |
POSIX_TRACE_FLUSH | This policy is identical to the POSIX_TRACE_UNTIL_FULL trace stream full policy except that the trace stream is flushed regularly as if the posix_trace_flush subroutine is called. Defining this policy for an active trace stream without log is not valid. |
For an active trace stream without log, the default value for the stream-full-policy attribute is POSIX_TRACE_LOOP.
For an active trace stream with log, the default value for thestream-full-policy attribute is POSIX_TRACE_FLUSH.
If the subroutine is called with a non-initialized attributes object as parameter, the result is not specified.
Item | Description |
---|---|
attr | Specifies the trace attributes object. |
streampolicy | Specifies where the stream-full-policy attribute of the attr object is stored. |
Upon successful completion, the subroutine returns a value of zero. Otherwise, it returns the corresponding error number.
If successful, the posix_trace_attr_getstreamfullpolicy subroutine stores the value of the stream-full-policy attribute in the object specified by the streampolicy parameter. Otherwise, the content of this object is not modified.
Item | Description |
---|---|
EINVAL | The attr parameter is null or the other parameter is not valid. |
The trace.h file in AIX® Version 7.1 Files Reference