From 0630e9d3afdd48da304f7e88cf931b7d4f26f2ea Mon Sep 17 00:00:00 2001 From: Tate Haga Date: Wed, 17 Oct 2018 18:46:26 -0400 Subject: [PATCH] more syntax fixes --- nx/include/switch/kernel/barrier.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/nx/include/switch/kernel/barrier.h b/nx/include/switch/kernel/barrier.h index 2278d67e..02c27d07 100644 --- a/nx/include/switch/kernel/barrier.h +++ b/nx/include/switch/kernel/barrier.h @@ -7,19 +7,19 @@ #pragma once #include "semaphore.h" -// barrier structure -typedef struct Barrier{ - u64 count; - u64 thread_total; - Semaphore throttle; - Semaphore lock; - Semaphore thread_wait; +/// Barrier structure +typedef struct Barrier { + u64 count; ///< Number of threads to reach the barrier + u64 thread_total; ///< Number of threads to wait on + Semaphore throttle; ///< Semaphore to make sure threads release to scheduler one at a time + Semaphore lock; ///< Semaphore to lock barrier to prevent multiple operations by threads at once + Semaphore thread_wait; ///< Semaphore to force a thread to wait if count < thread_total } Barrier; /** * @brief Initializes a barrier and the number of threads to wait on. * @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);