Paolo Bonzini a7b91d35ba coroutine-lock: make CoRwlock thread-safe and fair
This adds a CoMutex around the existing CoQueue.  Because the write-side
can just take CoMutex, the old "writer" field is not necessary anymore.
Instead of removing it altogether, count the number of pending writers
during a read-side critical section and forbid further readers from
entering.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 20170213181244.16297-7-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-02-21 11:39:40 +00:00
..
2016-02-23 12:43:05 +00:00
2016-09-13 19:13:32 +02:00
2016-06-07 18:19:23 +03:00
2016-10-26 08:29:01 -07:00
2016-11-01 10:29:03 -06:00
2016-02-23 12:43:05 +00:00
2016-06-16 18:39:03 +02:00
2017-01-24 23:26:52 +03:00
2017-01-24 17:54:47 +00:00
2016-06-07 18:19:24 +03:00
2017-01-23 15:32:46 +00:00
2016-02-23 12:43:05 +00:00
2016-02-23 12:43:05 +00:00
2016-09-15 15:32:22 +03:00
2016-09-23 11:42:52 +08:00
2017-01-24 23:26:52 +03:00