This is complex, but I think it is reasonably documented in the source.
Signed-off-by: Paolo Bonzini
---
docs/lockcnt.txt | 9 +-
include/qemu/futex.h | 36 ++
include/qemu/thread.h| 2 +
util/lockcnt.c | 283
This is complex, but I think it is reasonably documented in the source.
Signed-off-by: Paolo Bonzini
---
docs/lockcnt.txt | 9 +-
include/qemu/futex.h | 36 ++
include/qemu/thread.h| 2 +
util/lockcnt.c | 283
On 12/01/2017 14:34, Fam Zheng wrote:
>> + */
>> +while ((*val & QEMU_LOCKCNT_STATE_MASK) != QEMU_LOCKCNT_STATE_FREE) {
>> +if ((*val & QEMU_LOCKCNT_STATE_MASK) == QEMU_LOCKCNT_STATE_LOCKED) {
>> +int expected = *val;
>> +int new = expected -
On Wed, 01/04 14:26, Paolo Bonzini wrote:
> diff --git a/include/qemu/futex.h b/include/qemu/futex.h
> new file mode 100644
> index 000..852d612
> --- /dev/null
> +++ b/include/qemu/futex.h
> @@ -0,0 +1,36 @@
> +/*
> + * Wrappers around Linux futex syscall
> + *
> + * Copyright Red Hat, Inc.
On 11/01/2017 17:50, Stefan Hajnoczi wrote:
> On Wed, Jan 04, 2017 at 02:26:19PM +0100, Paolo Bonzini wrote:
>> +unsigned qemu_lockcnt_count(QemuLockCnt *lockcnt)
>> +{
>> +return lockcnt->count >> QEMU_LOCKCNT_COUNT_SHIFT;
>
> According to docs/atomics.txt at least atomic_read() should be
On Wed, Jan 04, 2017 at 02:26:19PM +0100, Paolo Bonzini wrote:
> +unsigned qemu_lockcnt_count(QemuLockCnt *lockcnt)
> +{
> +return lockcnt->count >> QEMU_LOCKCNT_COUNT_SHIFT;
According to docs/atomics.txt at least atomic_read() should be used here
otherwise sanitizers could flag up this
This is complex, but I think it is reasonably documented in the source.
Signed-off-by: Paolo Bonzini
---
docs/lockcnt.txt | 9 +-
include/qemu/futex.h | 36 ++
include/qemu/thread.h| 2 +
util/lockcnt.c | 282
This is complex, but I think it is reasonably documented in the source.
Signed-off-by: Paolo Bonzini
---
docs/lockcnt.txt | 9 +-
include/qemu/futex.h | 36 ++
include/qemu/thread.h| 2 +
util/lockcnt.c | 282
On Tue, Nov 29, 2016 at 12:47:01PM +0100, Paolo Bonzini wrote:
> diff --git a/include/qemu/futex.h b/include/qemu/futex.h
> new file mode 100644
> index 000..c3d1089
> --- /dev/null
> +++ b/include/qemu/futex.h
> @@ -0,0 +1,36 @@
> +/*
> + * Wrappers around Linux futex syscall
> + *
> + *
This is complex, but I think it is reasonably documented in the source.
Signed-off-by: Paolo Bonzini
---
docs/lockcnt.txt | 9 +-
include/qemu/futex.h | 36 ++
include/qemu/thread.h| 2 +
util/lockcnt.c | 282
10 matches
Mail list logo