[Previous] [Contents] [Next]

pthread_attr_setstacklazy()

Set thread stack attribute

Synopsis:

#include <pthread.h>

int pthread_attr_setstacklazy(
                    pthread_attr_t * attr,
                    int lazystack );

Library:

libc

Description:

The pthread_attr_setstacklazy() function sets the thread stack attribute in the attribute object attr to lazystack.

Possible values for lazystack are:

PTHREAD_STACK_LAZY
Allocate physical memory for the thread stack on demand (the default).
PTHREAD_STACK_NOTLAZY
Allocate physical memory for the whole stack up front. Use this value to ensure that your server processes don't die later on because it's unable to allocate stack memory. We recommend that you set the stack size as well since the default stack size is probably much larger than you really need.

Returns:

EOK
Success.
EINVAL
Invalid thread attribute object attr.
ENOTSUP
Invalid thread inherit scheduling attribute lazystack.

Classification:

QNX 6

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

pthread_attr_getstacklazy(), pthread_attr_setinheritsched()


[Previous] [Contents] [Next]