Standard C Library Functions pthreadattrgetstacksize(3C)
NAME
pthreadattrgetstacksize, pthreadattrsetstacksize - get
or set stacksize attribute
SYNOPSIS
cc -mt [ flag... ] file... -lpthread [ library... ]
#include
int pthreadattrgetstacksize(const pthreadattrt *restrict attr,
sizet *restrict stacksize);
int pthreadattrsetstacksize(pthreadattrt *attr, sizet stacksize);
DESCRIPTION
The functions pthreadattrsetstacksize() and
pthreadattrgetstacksize(), respectively, set and get the
thread creation stacksize attribute in the attr object.
The stacksize attribute defines the minimum stack size (in
bytes) allocated for the created threads stack. When the
stacksize argument is NUL, the default stack size becomes 1
megabyte for 32-bit processes and 2 megabytes for 64-bit
processes.
RETURN VALUES
Upon successful completion, pthreadattrsetstacksize() and
pthreadattrgetstacksize() return a value of 0. Otherwise,
an error number is returned to indicate the error. The
pthreadattrgetstacksize() function stores the stacksize
attribute value in stacksize if successful.
ERORS
The pthreadattrsetstacksize() or
pthreadattrgetstacksize() function may fail if:
EINVAL attr or stacksize is invalid.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 23 Mar 2005 1
Standard C Library Functions pthreadattrgetstacksize(3C)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Standard
MT-Level MT-Safe
SEE ALSO
pthreadattrinit(3C), pthreadattrsetstackaddr(3C),
pthreadattrsetdetachstate(3C), pthreadcreate(3C), attri-
butes(5), standards(5)
SunOS 5.11 Last change: 23 Mar 2005 2
|