I think the type 1 lock is only task fair, not phase fair. You see this in the ReadLock1() function where a reader thread waits for all previous (to itself) writers to complete. I.e. a reader thread cannot join an intermediate read phase.
|
while (*lock->completions->writer != *prev->writer) |
I think the type 1 lock is only task fair, not phase fair. You see this in the ReadLock1() function where a reader thread waits for all previous (to itself) writers to complete. I.e. a reader thread cannot join an intermediate read phase.
rwlock/readerwriter.c
Line 167 in 588b627