posix_trace_get_attr Subroutine

Purpose

Retrieve trace attributes.

Library

Posix Trace Library (libposixtrace.a)

Syntax

#include <trace.h>

int posix_trace_get_attr(trid, attr)
trace_id_t trid;
trace_attr_t *attr;

Description

The posix_trace_get_attr subroutine copies the attributes of the active trace stream identified by the trid into the attr parameter. The trid parameter might represent a pre-recorded trace log.

If the posix_trace_get_attr subroutine is called with a non-initialized attribute object as a parameter, the result is not specified.

Parameters

Item Description
trid Specifies the trace stream identifier.
attr Specifies the trace attributes object.

Return Values

On successful completion, the posix_trace_get_attr subroutine returns a value of zero. Otherwise, it returns the corresponding error number.

If successful, the posix_trace_get_attr subroutine stores the trace attributes in the attr parameter.

Errors

The posix_trace_get_attr subroutine fails if the following error number returns:
Item Description
EINVAL The trid trace stream parameter does not correspond to a valid active trace stream or a valid trace log.

Files

The trace.h file in the Files Reference.