« Previous | Next » 

Revision ea753d81

IDea753d81e8b085d679f13e4a6023e003e9854d51

Added by Paolo Bonzini over 10 years ago

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 <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences