Initializes a trace stream attributes object.
Posix Trace Library (libposixtrace.a)
#include <trace.h>
int posix_trace_attr_init(attr)
trace_attr_t * attr;
Attribute field | Default value |
---|---|
stream_minsize | 8192 bytes |
stream_fullpolicy | For a stream without LOG, the default value
is POSIX_TRACE_LOOP For a stream with LOG, the default value is POSIX_TRACE_FLUSH |
max_datasize | 16 bytes |
inheritance | POSIX_TRACE_CLOSE_FOR_CHILD |
log_maxsize | 1 MB |
log_fullpolicy | POSIX_TRACE_LOOP |
Attribute field | Value |
---|---|
version | 0.1 |
clock-resolution | Clock resolution of the clock used to generate timestamps. |
When the stream is created by the posix_trace_create or posix_trace_create_withlog subroutines, the creation_time attribute is set.
When the posix_trace_attr_init subroutine is called specifying an already initialized attr attributes object, this object is initialized with default values, the same as the values in the first initialization. If it is not saved, the already initialized attr attributes object is not accessible any more.
When used by the posix_trace_create subroutine, the resulting attributes object defines the attributes of the trace stream created. A single attributes object can be used in multiple calls to the posix_trace_create subroutine. After one or more trace streams have been created using an attributes object, any subroutine affecting that attributes object, including destruction, will not affect any trace stream previously created. An initialized attributes object also serves to receive the attributes of an existing trace stream or trace log when calling the posix_trace_get_attr subroutine.
The posix_trace_attr_init subroutine initializes again a destroyed attr attributes object.
Item | Description |
---|---|
attr | Specifies the trace attributes object to initialize. |
Upon successful completion, it returns a value of zero. Otherwise, it returns the corresponding error number.
Item | Description |
---|---|
EINVAL | The value of the attr parameter is null. |
ENOMEM | Insufficient memory to initialize the trace attribute object . |
The trace.h file in AIX® Version 7.1 Files Reference