summary refs log tree commit diff stats
path: root/scripts/qapi/doc.py
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2019-10-07 15:36:37 +0100
committerDr. David Alan Gilbert <dgilbert@redhat.com>2019-10-11 14:19:49 +0100
commit5626f8c6d46832b02ce4fdc0bd109516bc812043 (patch)
tree1f5ebde7290eb695f62e050a047168cc5c745feb /scripts/qapi/doc.py
parent8f8d528e73144c063deafc534df0a04c67f6f98e (diff)
downloadfocaccia-qemu-5626f8c6d46832b02ce4fdc0bd109516bc812043.tar.gz
focaccia-qemu-5626f8c6d46832b02ce4fdc0bd109516bc812043.zip
rcu: Add automatically released rcu_read_lock variants
RCU_READ_LOCK_GUARD() takes the rcu_read_lock and then uses glib's
g_auto infrastructure (and thus whatever the compiler's hooks are) to
release it on all exits of the block.

WITH_RCU_READ_LOCK_GUARD() is similar but is used as a wrapper for the
lock, i.e.:

   WITH_RCU_READ_LOCK_GUARD() {
       stuff under lock
   }

Note the 'unused' attribute is needed to work around clang bug:
  https://bugs.llvm.org/show_bug.cgi?id=43482

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20191007143642.301445-2-dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'scripts/qapi/doc.py')
0 files changed, 0 insertions, 0 deletions