mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-05 19:02:14 +02:00
more syntax fixes
This commit is contained in:
parent
2b7a26ad17
commit
0630e9d3af
@ -7,19 +7,19 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "semaphore.h"
|
#include "semaphore.h"
|
||||||
|
|
||||||
// barrier structure
|
/// Barrier structure
|
||||||
typedef struct Barrier{
|
typedef struct Barrier {
|
||||||
u64 count;
|
u64 count; ///< Number of threads to reach the barrier
|
||||||
u64 thread_total;
|
u64 thread_total; ///< Number of threads to wait on
|
||||||
Semaphore throttle;
|
Semaphore throttle; ///< Semaphore to make sure threads release to scheduler one at a time
|
||||||
Semaphore lock;
|
Semaphore lock; ///< Semaphore to lock barrier to prevent multiple operations by threads at once
|
||||||
Semaphore thread_wait;
|
Semaphore thread_wait; ///< Semaphore to force a thread to wait if count < thread_total
|
||||||
} Barrier;
|
} Barrier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initializes a barrier and the number of threads to wait on.
|
* @brief Initializes a barrier and the number of threads to wait on.
|
||||||
* @param b Barrier object.
|
* @param b Barrier object.
|
||||||
* @param thread_count initial value for the number of threads the barrier must wait for.
|
* @param thread_count Initial value for the number of threads the barrier must wait for.
|
||||||
*/
|
*/
|
||||||
void barrierInit(Barrier *b, u64 thread_count);
|
void barrierInit(Barrier *b, u64 thread_count);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user