HTL_initialize_library
Initializes HTL.
Interface Definition
int HTL_initialize_library(void);
Description
HTL_initialize_library() is used to initialize the HTL execution environment.
- If the HTL thread has not been initialized, the first caller of HTL_initialize_library() becomes the primary worker running on the primary executor.
- If the HTL thread has been initialized and the initialization function HTL_initialize_library() is invoked, HTL increases the reference count of the function atomically. This function returns HTL_THREAD_SUCCESS even if the HTL thread has been initialized.
After being used, the HTL thread must be released by HTL_finalize_library(). The HTL thread can be initialized and deinitialized multiple times in nested mode, but the callers of HTL_finalize_library() and HTL_initialize_library() must be at the same nesting level. After the HTL thread is released, it can be initialized again.
In HTL-PThreads development mode, the initialization interface does not need to be invoked.
Parameters
N/A
Return Value
- HTL_THREAD_SUCCESS: success.
- Other values: failure. For details, see the error code descriptions.
Parent topic: Initialization Functions