Re: [Qemu-devel] [PATCH v5 1/4] seqlock: introduce read-write seqlock

2013-09-25 Thread liu ping fan
On Wed, Sep 25, 2013 at 2:20 PM, Liu Ping Fan wrote: > From: Paolo Bonzini > > Seqlock implementation for QEMU. Usage idiom > > reader: > do{ > start = seqlock_read_begin() > > }while(seqlock_read_try(start)) > > writer: > seqlock_write_lock() > ... > seqlock_write_unlock() > > init

Re: [Qemu-devel] [PATCH v5 1/4] seqlock: introduce read-write seqlock

2013-09-25 Thread Paolo Bonzini
Il 25/09/2013 08:20, Liu Ping Fan ha scritto: > From: Paolo Bonzini > > Seqlock implementation for QEMU. Usage idiom > > reader: > do{ > start = seqlock_read_begin() > > }while(seqlock_read_try(start)) > > writer: > seqlock_write_lock() > ... > seqlock_write_unlock() > > initial

[Qemu-devel] [PATCH v5 1/4] seqlock: introduce read-write seqlock

2013-09-24 Thread Liu Ping Fan
From: Paolo Bonzini Seqlock implementation for QEMU. Usage idiom reader: do{ start = seqlock_read_begin() }while(seqlock_read_try(start)) writer: seqlock_write_lock() ... seqlock_write_unlock() initialization: seqlock_init(QemuSeqLock *sl, QemuMutex *mutex) where mutex could