From bd44784c5f5d1c349dd5c874553735e433578be4 Mon Sep 17 00:00:00 2001 From: Ali Mashtizadeh Date: Mon, 16 Oct 2023 15:07:17 -0400 Subject: [PATCH] Cleanup comments and change CV_WakeAll -> CV_Broacast --- sys/kern/cv.c | 4 ++-- sys/kern/waitchannel.c | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/sys/kern/cv.c b/sys/kern/cv.c index 4a98753..3161bf0 100644 --- a/sys/kern/cv.c +++ b/sys/kern/cv.c @@ -70,12 +70,12 @@ CV_Signal(CV *cv) } /** - * CV_WakeAll -- + * CV_Broadcast -- * * Wake all threads waiting on the condition. */ void -CV_WakeAll(CV *cv) +CV_Broadcast(CV *cv) { WaitChannel_WakeAll(&cv->chan); diff --git a/sys/kern/waitchannel.c b/sys/kern/waitchannel.c index 51a1e03..5ca1b54 100644 --- a/sys/kern/waitchannel.c +++ b/sys/kern/waitchannel.c @@ -51,7 +51,7 @@ WaitChannel_Destroy(WaitChannel *wchan) /** * WaitChannel_Lock -- * - * Acquires the wait channel lock. + * Acquires the wait channel lock. */ void WaitChannel_Lock(WaitChannel *wchan) @@ -62,11 +62,10 @@ WaitChannel_Lock(WaitChannel *wchan) /** * WaitChannel_Sleep -- * - * Places the current thread to asleep while releasing the wait channel - * lock. + * Places the current thread to asleep while releasing the wait channel lock. * * Side Effect: - * Retains a reference to thread until the thread is woken up. + * Retains a reference to thread until the thread is woken up. */ void WaitChannel_Sleep(WaitChannel *wchan) @@ -83,10 +82,10 @@ WaitChannel_Sleep(WaitChannel *wchan) /** * WaitChannel_Wake -- * - * Wake up a single thread. + * Wake up a single thread. * * Side Effects: - * Releases the thread reference once complete. + * Releases the thread reference once complete. */ void WaitChannel_Wake(WaitChannel *wchan) @@ -108,10 +107,10 @@ WaitChannel_Wake(WaitChannel *wchan) /** * WaitChannel_WakeAll -- * - * Wakes up all threads currently sleeping on the wait channel. + * Wakes up all threads currently sleeping on the wait channel. * * Side Effects: - * Releases all thread references. + * Releases all thread references. */ void WaitChannel_WakeAll(WaitChannel *wchan)