aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/private/SkSemaphore.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/private/SkSemaphore.h b/include/private/SkSemaphore.h
index dbc16b64ce..aeca9729dc 100644
--- a/include/private/SkSemaphore.h
+++ b/include/private/SkSemaphore.h
@@ -22,7 +22,7 @@ public:
void signal(int n = 1);
// Decrement the counter by 1,
- // then if the counter is <= 0, sleep this thread until the counter is > 0.
+ // then if the counter is < 0, sleep this thread until the counter is >= 0.
void wait();
// If the counter is positive, decrement it by 1 and return true, otherwise return false.
@@ -40,7 +40,7 @@ private:
//
// We wrap an OS-provided semaphore with a user-space atomic counter that
// lets us avoid interacting with the OS semaphore unless strictly required:
- // moving the count from >0 to <=0 or vice-versa, i.e. sleeping or waking threads.
+ // moving the count from >=0 to <0 or vice-versa, i.e. sleeping or waking threads.
struct OSSemaphore;
void osSignal(int n);
@@ -61,7 +61,7 @@ inline void SkBaseSemaphore::signal(int n) {
int prev = fCount.fetch_add(n, std::memory_order_release);
// We only want to call the OS semaphore when our logical count crosses
- // from <= 0 to >0 (when we need to wake sleeping threads).
+ // from <0 to >=0 (when we need to wake sleeping threads).
//
// This is easiest to think about with specific examples of prev and n.
// If n == 5 and prev == -3, there are 3 threads sleeping and we signal