commit | ea753d81e8b085d679f13e4a6023e003e9854d51 | [log] [tgz] |
---|---|---|
author | Paolo Bonzini <pbonzini@redhat.com> | Wed Sep 25 14:20:57 2013 +0800 |
committer | Paolo Bonzini <pbonzini@redhat.com> | Thu Oct 17 17:24:15 2013 +0200 |
tree | 072bf3d6c7a3bd8726fe767cbf90470b7172ebce | |
parent | c46860ea53854a96b11af0d6e23b623ce199e95e [diff] |
seqlock: introduce read-write seqlock Seqlock implementation for QEMU. Usage idiom reader: do { start = seqlock_read_begin(&sl); ... } while (seqlock_read_retry(&sl, start)); writer: seqlock_write_lock(&sl); ... seqlock_write_unlock(&sl); initialization: seqlock_init(QemuSeqLock *sl, QemuMutex *mutex) mutex could be NULL if the caller will provide its own protection for concurrent write sides (typically using the BQL). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>