我要评分
获取效率
正确性
完整性
易理解

HTL_thread_barrier_wait

Waits for all threads to reach the barrier.

Interface Definition

int HTL_thread_barrier_wait(HTL_thread_barrier_t *thread_barrier);

Description

HTL_thread_barrier_wait() is used by the caller to wait on the barrier. The caller pauses until the number of waiters that reach the barrier is the same as the value specified by HTL_thread_barrier_init() or HTL_thread_barrier_reinit().

Parameters

Parameter

Type

Description

Input/Output

thread_barrier

HTL_thread_barrier_t *

Address of the handle to the barrier.

Input

Return Value

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

Example

ret = HTL_thread_barrier_wait(&barrier);