posix_trace_attr_setmaxdatasize Subroutine

Purpose

Sets 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_setmaxdatasize(attr, maxdatasize)
trace_attr_t *attr;
size_t maxdatasize;

Description

The posix_trace_attr_setmaxdatasize subroutine sets the maximum size, in bytes, that is allowed, in the max-data-size attribute of the attr object, using the size value specified by the maxdatasize parameter. This maximum size is the maximum allowed size for the user data argument that could be passed to the posix_trace_event subroutine. The system truncates data passed to posix_trace_event the which is longer than the maximum data size.

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 attained.

Return Values

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

Errors

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

Files

The trace.h file and the types.h file in the AIX® Version 7.1 Files Reference.