posix_trace_attr_getmaxdatasize Subroutine

Purpose

Retrieves the maximum user trace event data size.

Library

Posix Trace Library (libposixtrace.a)

Syntax

#include <sys/types.h>
#include <trace.h>

int posix_trace_attr_getmaxdatasize(attr, maxdatasize)
const trace_attr_t *restrict attr;
size_t *restrict maxdatasize;

Description

The posix_trace_attr_getmaxdatasize subroutine copies the maximum user trace event data size, in bytes, from the max-data-size attribute of the attr object into the variable specified the maxdatasize parameter. The default value for the max-data-size attribute is 16 bytes.

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

Parameters

Item Description
attr Specifies the trace attributes' object.
maxdatasize Specifies where the max-data-size attribute, in bytes, will be stored.

Return Values

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

The posix_trace_attr_getmaxdatasize subroutine stores the maximum trace event record memory size in the object pointed to by the maxdatasize parameter, if successful.

Errors

This subroutine fails if the following error number returns:
Item Description
EINVAL The parameter is null or not valid.

Files

The trace.h file and the types.h file in Files Reference.