# posix_trace_attr_destroy

## PROLOG



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


## NAME



           posix_trace_attr_destroy, posix_trace_attr_init — destroy and
           initialize the trace stream attributes object (**TRACING**)
    


## SYNOPSIS



           #include <trace.h>
    
           int posix_trace_attr_destroy(trace_attr_t *_attr_);
           int posix_trace_attr_init(trace_attr_t *_attr_);
    


## DESCRIPTION



           The _posix_trace_attr_destroy_() function shall destroy an
           initialized trace attributes object.  A destroyed _attr_ attributes
           object can be reinitialized using _posix_trace_attr_init_(); the
           results of otherwise referencing the object after it has been
           destroyed are undefined.
    
           The _posix_trace_attr_init_() function shall initialize a trace
           attributes object _attr_ with the default value for all of the
           individual attributes used by a given implementation. The read-
           only _generation-version_ and _clock-resolution_ attributes of the
           newly initialized trace attributes object shall be set to their
           appropriate values (see _Section 2.11.1.2_ , _posix_trace_status_info_
           _Structure_).
    
           Results are undefined if _posix_trace_attr_init_() is called
           specifying an already initialized _attr_ attributes object.
    
           Implementations may add extensions to the trace attributes object
           structure as permitted in the Base Definitions volume of
           POSIX.1‐2017, _Chapter 2_ , _Conformance_.
    
           The resulting attributes object (possibly modified by setting
           individual attributes values), when used by _posix_trace_create_(),
           defines the attributes of the trace stream created. A single
           attributes object can be used in multiple calls to
           _posix_trace_create_().  After one or more trace streams have been
           created using an attributes object, any function affecting that
           attributes object, including destruction, shall 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_() function.
    


## RETURN VALUE



           Upon successful completion, these functions shall return a value
           of zero. Otherwise, they shall return the corresponding error
           number.
    


## ERRORS



           The _posix_trace_attr_destroy_() function may fail if:
    
           **EINVAL** The value of _attr_ is invalid.
    
           The _posix_trace_attr_init_() function shall fail if:
    
           **ENOMEM** Insufficient memory exists to initialize the trace
                  attributes object.
    
           _The following sections are informative._
    


## EXAMPLES



           None.
    


## APPLICATION USAGE



           None.
    


## RATIONALE



           None.
    


## FUTURE DIRECTIONS



           The _posix_trace_attr_destroy_() and _posix_trace_attr_init_()
           functions may be removed in a future version.
    


* * *