Changeset 41dcabc in mainline


Ignore:
Timestamp:
2025-01-18T12:10:11Z (13 days ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
afb4025
Parents:
b8fd951
Message:

libc: Prevent writer starvation in fibril_rwlock_t.

Thanks to Miroslav Cimerman for pointing this issue out.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/thread/fibril_synch.c

    rb8fd951 r41dcabc  
    263263        futex_lock(&fibril_synch_futex);
    264264
    265         if (!frw->writers) {
     265        if (!frw->writers && list_empty(&frw->waiters)) {
    266266                /* Consider the first reader the owner. */
    267267                if (frw->readers++ == 0)
Note: See TracChangeset for help on using the changeset viewer.