Am 18.09.2012 16:44, schrieb Paolo Bonzini: > Il 18/09/2012 13:40, Kevin Wolf ha scritto: >> + qemu_co_mutex_unlock(&s->lock); >> + qemu_co_rwlock_wrlock(&m->l2_writeback_lock); > > Can anybody else take the lock as reader again at this point? If not, I > wonder if this is more clear if you write it as a CoQueue.
This isn't "let one writer complete, then wake up n readers" (which would indeed be represented more naturally as CoQueue), but rather "let n readers complete, then wake up one writer". Kevin