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-07-12 16:20:46 +02:00
2016-10-26 08:28:57 -07:00
2016-07-12 16:20:46 +02:00
2016-07-12 16:20:46 +02:00
2016-10-08 11:25:29 +03:00
2016-11-15 10:05:50 +11:00
2016-07-12 15:08:53 +01:00
2016-07-12 16:20:46 +02:00
2016-02-23 12:43:05 +00:00
2017-02-01 03:37:17 +02:00
2017-01-23 21:25:36 -02:00
2017-02-21 11:14:07 +00:00
2017-02-21 11:39:40 +00:00
2014-02-26 17:20:07 +00:00
2016-09-13 19:13:32 +02:00
2012-12-19 08:32:39 +01:00
2016-11-01 16:06:57 +01:00
2017-01-16 17:52:35 +01:00
2016-07-12 16:19:16 +02:00
2016-06-07 18:19:23 +03:00
2016-07-12 16:20:46 +02:00
2017-01-16 13:25:18 +00:00
2017-01-26 10:25:01 +08:00
2016-07-12 16:20:46 +02:00
2017-01-31 10:10:14 +11:00
2016-07-12 16:20:46 +02:00
2016-10-26 08:29:01 -07:00
2016-03-22 22:20:16 +01:00
2016-09-27 17:54:21 +08:00
2016-11-01 10:29:03 -06:00
2017-01-16 17:52:35 +01:00
2016-02-23 12:43:05 +00:00
2016-07-12 16:20:46 +02:00
2016-10-12 09:52:50 +02:00
2013-06-28 09:20:26 +02:00
2016-07-12 16:19:16 +02:00
2017-02-09 17:28:49 +01:00
2017-02-01 03:37:17 +02:00
2016-07-12 16:20:46 +02:00
2016-06-11 23:10:17 +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-07-04 16:49:33 +03:00
2016-07-13 13:41:38 +02:00
2016-07-12 16:20:46 +02:00
2016-06-07 18:19:24 +03:00
2016-07-12 16:20:46 +02:00
2016-10-04 10:00:26 +02:00
2017-01-23 15:32:46 +00:00
2016-10-28 21:50:18 +08:00
2016-10-28 21:50:18 +08:00
2017-01-16 13:25:18 +00:00
2016-02-23 12:43:05 +00:00
2016-02-23 12:43:05 +00:00
2016-12-22 16:00:24 +01:00
2017-01-27 18:07:59 +01:00
2016-07-12 16:20:46 +02: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