[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] New condition variable design: OpenOffice works



>   if(wake_writers && (!wake_readers || (rwlock->algorithm == WRITERS_RULE))
>     futex_wake(&rwlock->write_blockers, 1);
>   if(wake_readers && (!wake_writers || (rwlock->algorithm == READERS_RULE))
>     futex_wake(&rwlock->read_blockers, MAX_INT);
This should be:
   if(wake_writers && (!wake_readers || (rwlock->algorithm != READERS_RULE))
     futex_wake(&rwlock->write_blockers, 1);
   if(wake_readers && (!wake_writers || (rwlock->algorithm != WRITERS_RULE))
     futex_wake(&rwlock->read_blockers, MAX_INT);

Attachment: signature.asc
Description: This is a digitally signed message part


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]