Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pthread_attr_setstacksize(3-thr)           pthread_attr_setstacksize(3-thr)

NAME
     pthreadattrsetstacksize - changes the stacksize attribute of thread
     creation

SYNOPSIS
     #include <pthread.h>

     int pthreadattrsetstacksize(
          pthreadattrt *attr,
          long stacksize);

PARAMETERS
     attr        Thread attributes object modified.

     stacksize   New value for the stacksize attribute. The stacksize
                 parameter specifies the minimum size (in bytes) of the
                 stack needed for a thread.

DESCRIPTION
     The pthreadattrsetstacksize() routine sets the minimum size (in
     bytes) of the stack needed for a thread created using the attributes
     object specified by the attr parameter. Use this routine to adjust the
     size of the writable area of the stack. The default value of the
     stacksize attribute is machine specific.

     A thread's stack is fixed at the time of thread creation. Only the
     main or initial thread can dynamically extend its stack.

     Most compilers do not check for stack overflow. Ensure that your
     thread stack is large enough for anything that you call from the
     thread.

RETURN VALUES
     If the function fails, errno may be set to one of the following
     values:

     EINVAL    The value specified by attr is invalid.

     EINVAL    The value specified by stacksize is invalid.

SEE ALSO
     pthreadattrcreate(3-thr), pthreadattrgetstacksize(3-thr),
     pthreadcreate(3-thr).












Page 1                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026