Rate This Document
Findability
Accuracy
Completeness
Readability

HTL_thread_attr_init

Initializes the thread attribute.

Interface Definition

int HTL_thread_attr_init(HTL_thread_attr_t *thread_attr);

Description

HTL_thread_attr_init() uses the default attribute parameters to initialize the thread attribute and returns the attribute handle through thread_attr.

The default thread attribute parameters are as follows:

  • If the memory pool is enabled, the memory pool is used for stack allocation.
  • Default stack size can be set through the environment variable HTL_THREAD_STACKSIZE.
  • Migratable.
  • No callback function is called during migration.

thread_attr needs to be destroyed by HTL_thread_attr_destroy() after being used.

Parameters

Parameter

Type

Description

Input/Output

thread_attr

HTL_thread_attr_t *

Address of the handle to the thread attribute.

Output

Return Value

  • HTL_THREAD_SUCCESS: success.
  • Other values: failure. For details, see the error code descriptions.

Example

    HTL_thread_attr_t attr;    
    /* ULT attribute */
    ret = HTL_thread_attr_init(&attr);