HTL_thread_attr_getstacksize
Obtains the stack size from the thread attribute.
Interface Definition
int HTL_thread_attr_getstacksize(HTL_thread_attr_t *thread_attr, size_t *stacksize);
Description
HTL_thread_attr_getstacksize() obtains the stack size (in bytes) from the thread attribute and returns the result through stacksize.
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. |
Output |
Return Value
- HTL_THREAD_SUCCESS: success.
- Other values: failure. For details, see the error code descriptions.
Example
HTL_thread_attr_t attr;
size_t stacksize;
HTL_thread_t thread = HTL_thread_self();
int ret;
ret = HTL_thread_get_attr(thread, &attr);
ret = HTL_thread_attr_getstacksize(&attr, &stacksize);
Parent topic: Thread Attribute Functions