Sets the maximum user trace event data size.
Posix Trace Library (libposixtrace.a)
#include <sys/types.h>
#include <trace.h>
int posix_trace_attr_setmaxdatasize(attr, maxdatasize)
trace_attr_t *attr;
size_t maxdatasize;
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.
Item | Description |
---|---|
attr | Specifies the trace attributes object. |
maxdatasize | Specifies where the max-data-size attribute, in bytes, will be attained. |
Upon successful completion, this subroutine returns a value of zero. Otherwise, it returns the corresponding error number.
Item | Description |
---|---|
EINVAL | The attr parameter is null or the other parameter is not valid. |