pthread_attr_setstacksize()

set thread stack size attribute 

Function


SYNOPSIS

#include <pthread.h>

int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize);


DESCRIPTION

The pthread_attr_setstacksize() function sets the thread stack size attribute for the specified thread attribute object.


PARAMETERS

attr 

Is a thread attribute object.

stacksize 

Is the stack size attribute value.


RETURN VALUES

On success, pthread_attr_setstacksize() returns 0. On error, one of the following values is returned.

EINVAL 

attr is not an initialized thread attribute object, or stacksize does not specify a valid stack size setting.

EFAULT 

attr is an invalid pointer.


CONFORMANCE

POSIX P1003.1 (1996)


MULTITHREAD SAFETY LEVEL

MT-safe.


PORTING ISSUES

On Windows, setting the thread stack size to 0 causes the thread's stack size to be inherited from the parent thread. This is the default setting.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
pthread_attr_getstacksize(), pthread_attr_init(), pthread_create()


PTC MKS Toolkit 10.4 Documentation Build 39.