posix_trace_get_status Subroutine

Purpose

Retrieves trace attributes or trace status.

Library

Posix Trace Library (libposixtrace.a)

Syntax

#include <trace.h>
int posix_trace_get_status(trid, statusinfo)
trace_id_t trid;
struct posix_trace_status_info *statusinfo;

Description

The posix_trace_get_status subroutine returns, in the structure pointed to by the statusinfo parameter, the current trace status for the trace stream identified by the trid parameter. If the trid parameter refers to a pre-recorded trace stream, the status parameter is the status of the completed trace stream.

When the posix_trace_get_status subroutine is used, the overrun status of the trace stream is reset to the POSIX_TRACE_NO_OVERRUN value after the call completes. See the trace.h File for further information.

If the trid parameter refers to a trace stream with a log, when the posix_trace_get_status subroutine is used, the log's overrun status of the trace stream is reset to the POSIX_TRACE_NO_OVERRUN value and the flush_error status is reset to a value of zero after the call completes.

If the trid parameter refers to a pre-recorded trace stream, the status that is returned is the status of the completed trace stream and the status values of the trace stream are not reset.

Parameters

Item Description
trid Specifies the trace stream identifier.
statusinfo Specifies the current trace status.

Return Values

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

If successful, the posix_trace_get_status subroutine stores the trace status in the statusinfo parameter.

Errors

The posix_trace_get_status 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.