diff options
| author | Malte Skarupke <malteskarupke@fastmail.fm> | 2024-12-04 07:55:22 -0500 |
|---|---|---|
| committer | Carlos O'Donell <carlos@redhat.com> | 2025-01-17 14:56:58 -0500 |
| commit | 0cc973160c23bb67f895bc887dd6942d29f8fee3 (patch) | |
| tree | dbd67b286197ce1cedf7c9457a0055b7421612b7 /nptl/pthread_cond_common.c | |
| parent | 1db84775f831a1494993ce9c118deaf9537cc50a (diff) | |
| download | glibc-0cc973160c23bb67f895bc887dd6942d29f8fee3.tar.xz glibc-0cc973160c23bb67f895bc887dd6942d29f8fee3.zip | |
nptl: Update comments and indentation for new condvar implementation
Some comments were wrong after the most recent commit. This fixes that.
Also fixing indentation where it was using spaces instead of tabs.
Signed-off-by: Malte Skarupke <malteskarupke@fastmail.fm>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'nptl/pthread_cond_common.c')
| -rw-r--r-- | nptl/pthread_cond_common.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nptl/pthread_cond_common.c b/nptl/pthread_cond_common.c index 512fc1248c..4d245ff66a 100644 --- a/nptl/pthread_cond_common.c +++ b/nptl/pthread_cond_common.c @@ -221,8 +221,9 @@ __condvar_quiesce_and_switch_g1 (pthread_cond_t *cond, uint64_t wseq, * New waiters arriving concurrently with the group switching will all go into G2 until we atomically make the switch. Waiters existing in G2 are not affected. - * Waiters in G1 will be closed out immediately by the advancing of - __g_signals to the next "lowseq" (low 31 bits of the new g1_start), + * Waiters in G1 have already received a signal and been woken. If they + haven't woken yet, they will be closed out immediately by the advancing + of __g_signals to the next "lowseq" (low 31 bits of the new g1_start), which will prevent waiters from blocking using a futex on __g_signals since it provides enough signals for all possible remaining waiters. As a result, they can each consume a signal |
