libnx  v4.7.0
Data Structures | Functions
barrier.h File Reference

Multi-threading Barrier. More...

#include "mutex.h"
#include "condvar.h"

Go to the source code of this file.

Data Structures

struct  Barrier
 Barrier structure. More...
 

Functions

void barrierInit (Barrier *b, u64 thread_count)
 Initializes a barrier and the number of threads to wait on. More...
 
void barrierWait (Barrier *b)
 Forces threads to wait until all threads have called barrierWait. More...
 

Detailed Description

Multi-threading Barrier.

Author
tatehaga

Function Documentation

◆ barrierInit()

void barrierInit ( Barrier b,
u64  thread_count 
)

Initializes a barrier and the number of threads to wait on.

Parameters
bBarrier object.
thread_countInitial value for the number of threads the barrier must wait for.

◆ barrierWait()

void barrierWait ( Barrier b)

Forces threads to wait until all threads have called barrierWait.

Parameters
bBarrier object.