posix_trace_start Subroutine

Purpose

Starts a trace.

Library

Posix Trace Library (libposixtrace.a)

Syntax

#include <trace.h>

int posix_trace_start(trid)
trace_id_t trid;

Description

The posix_trace_start subroutine starts the trace stream identified by the trid parameter.

The effect of calling the posix_trace_start subroutine is recorded in the trace stream as the POSIX_TRACE_START system trace event, and the status of the trace stream becomes POSIX_TRACE_RUNNING. If the trace stream is in progress when this subroutine is called, the POSIX_TRACE_START system trace event is not recorded, and the trace stream continues to run. If the trace stream is full, the POSIX_TRACE_START system trace event is not recorded, and the status of the trace stream is not changed.

Parameters

Item Description
trid Specifies the trace stream identifier.

Return Values

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

Errors

The subroutine fails if the following error number returns:
Item Description
EINVAL The value of the trid parameter does not correspond to an active trace stream and thus no trace stream is started or stopped.

Files

The trace.h file in Files Reference.