]> xenbits.xensource.com Git - qemu-xen.git/commit
xen / notify: introduce a new XenWatchList abstraction
authorPaul Durrant <paul.durrant@citrix.com>
Fri, 13 Sep 2019 08:21:56 +0000 (09:21 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Fri, 27 Sep 2019 10:21:34 +0000 (11:21 +0100)
commitcce75c3e068350456c4704c71ca727981a9c80f9
tree73c9aabeeca62f9cde9895da859e589d1b5f4c80
parent1a704a96301726c247c350665bbd24d83d8350da
xen / notify: introduce a new XenWatchList abstraction

Xenstore watch call-backs are already abstracted away from XenBus using
the XenWatch data structure but the associated NotifierList manipulation
and file handle registration is still open coded in various xen_bus_...()
functions.
This patch creates a new XenWatchList data structure to allow these
interactions to be abstracted away from XenBus as well. This is in
preparation for a subsequent patch which will introduce separate watch lists
for XenBus and XenDevice objects.

NOTE: This patch also introduces a new notifier_list_empty() helper function
      for the purposes of adding an assertion that a XenWatchList is not
      freed whilst its associated NotifierList is still occupied.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Anthony Perard <anthony.perard@citrix.com>
Message-Id: <20190913082159.31338-2-paul.durrant@citrix.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
(cherry picked from commit 374752a26b0ea487dd49c638ee35b97a58ce8e3b)
hw/xen/trace-events
hw/xen/xen-bus.c
include/hw/xen/xen-bus.h
include/qemu/notify.h
util/notify.c