pthread_attr_setstack()
Set the thread-creation stack attributes
Synopsis:
#include <pthread.h> int pthread_attr_setstack( pthread_attr_t *attr, void *stackaddr, size_t stacksize );
Arguments:
- attr
- A pointer to the pthread_attr_t structure that defines the attributes to use when creating new threads. For more information, see pthread_attr_init() .
- stackaddr
- The base address (i.e. the lowest addressable byte) of the created thread's stack.
- stacksize
- The size of the thread stack, in bytes.
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
The pthread_attr_setstack() function sets the stack attributes that specify the area of storage to be used for the created thread's stack. The value of stacksize must be at least PTHREAD_STACK_MIN.
Returns:
- EOK
- Success.
- EINVAL
- The stacksize is less than PTHREAD_STACK_MIN.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |