kzs_barrier.hpp File Reference

Thread barrier. More...

Functions

kzsError kzsThreadBarrierCreate (kzUint threadCount, struct KzsThreadBarrier **out_threadBarrier)
 Creates a thread synchronization barrier object. More...
 
kzsError kzsThreadBarrierDelete (struct KzsThreadBarrier *threadBarrier)
 Deletes a thread synchronization barrier object. More...
 
kzsError kzsThreadBarrierWait (struct KzsThreadBarrier *threadBarrier)
 Implements the barrier synchronization pattern. More...
 

Detailed Description

Thread barrier.

Copyright 2008-2017 by Rightware. All rights reserved.

Function Documentation

kzsError kzsThreadBarrierCreate ( kzUint  threadCount,
struct KzsThreadBarrier **  out_threadBarrier 
)

Creates a thread synchronization barrier object.

The threadCount parameter specifies the number of threads to rendezvous.

kzsError kzsThreadBarrierDelete ( struct KzsThreadBarrier threadBarrier)

Deletes a thread synchronization barrier object.

kzsError kzsThreadBarrierWait ( struct KzsThreadBarrier threadBarrier)

Implements the barrier synchronization pattern.

Blocks the calling thread until sufficient amount of threads have reached the barrier.