mirror of
https://github.com/switchbrew/libnx.git
synced 2025-12-29 22:39:11 +01:00
17 lines
291 B
C
17 lines
291 B
C
#pragma once
|
|
#include "semaphore.h"
|
|
|
|
|
|
// barrier structure
|
|
typedef struct barrier{
|
|
u64 count;
|
|
u64 thread_total;
|
|
Semaphore throttle;
|
|
Semaphore lock;
|
|
Semaphore thread_wait;
|
|
} barrier;
|
|
|
|
void barrierInit(barrier *my_barrier, u64 thread_count);
|
|
|
|
void barrierWait(barrier *b);
|