Rate This Document
Findability
Accuracy
Completeness
Readability

HTL_finalize_library

Finalizes HTL.

Interface Definition

int HTL_finalize_library(void);

Description

HTL_finalize_library() is used to terminate HTL.

  • If HTL_finalize_library() is invoked at the first nesting level, this function releases the resources in the HTL thread execution environment and sets the HTL status to uninitialized.
  • If HTL_finalize_library() is not invoked at the first nesting level, it decreases the reference count atomically.

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. If HTL_finalize_library() is invoked at the first nesting level, the caller must be the primary worker running on the primary executor.

In HTL-PThreads development mode, the finalize 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.