HTL_thread_attr_setstacksize
Sets the stack size in the thread attribute.
Interface Definition
int HTL_thread_attr_setstacksize(HTL_thread_attr_t *thread_attr, size_t stacksize);
Description
HTL_thread_attr_setstacksize() sets the stack size (stacksize, in bytes) in the thread attribute (thread_attr). If the stack memory has been set by HTL_thread_attr_setstack(), HTL_thread_attr_setstacksize() updates the stack size and retains the stack memory in thread_attr.
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
thread_attr |
HTL_thread_attr_t * |
Address of the handle to the thread attribute. |
Input |
stacksize |
size_t |
Stack size, in bytes. |
Input |
Return Value
- HTL_THREAD_SUCCESS: success.
- Other values: failure. For details, see the error code descriptions.
Example
1 2 3 | HTL_thread_attr_t attr; ret = HTL_thread_attr_init(&attr); ret = HTL_thread_attr_setstacksize(&attr, 32768); |
Parent topic: Thread Attribute Functions