Open System Services System Calls Reference Manual (G06.25+, H06.03+)

pthread_attr_getguardsize_np(2) OSS System Calls Reference Manual
NAME
pthread_attr_getguardsize_np
- Obtains the guardsize attribute of a thread attributes object
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
int pthread_attr_getguardsize_np(
const pthread_attr_t *attr,
size_t *guardsize );
PARAMETERS
attr species the address of the thread attributes object whose guardsize attribute is
obtained.
guardsize receives the value of the guardsize attribute.
DESCRIPTION
This function obtains the value of the guardsize attribute of the thread attributes object specied
by the attr parameter and returns it in the guardsize parameter. The specied thread attributes
object must already be initialized when this function called.
When creating a thread, use a thread attributes object to specify nondefault values for thread
attributes. The guardsize attribute of a thread attributes object species the minimum size (in
bytes) of the guard area for the stack of a new thread.
A guard area can help a multithreaded program detect overow of a threads stack. A guard area
is a region of no-access memory that the system allocates at the overow end of the threads
stack. When any thread attempts to access a memory location within this region, a memory
addressing violation occurs.
NOTES
The value of the guardsize attribute of a particular thread attributes object does not necessarily
correspond to the actual size of the guard area of any existing thread in a multithreaded program.
Use of this function makes your application nonportable.
RETURN VALUES
If an error condition occurs, this function returns an integer value indicating the type of error.
Possible return values are:
0 Successful completion.
[EINVAL] The value specied by the attr parameter is invalid.
RELATED INFORMATION
Functions: pthread_attr_init(2).
STANDARDS CONFORMANCE
This function is an extension to the XPG4 Version 2 specication and to the following industry
standards:
IEEE Std 1003.1c-1995, POSIX System Application Program Interface
520 Hewlett-Packard Company 527186-003