summaryrefslogtreecommitdiff
path: root/src/uml
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2011-12-13 11:14:46 +0000
committerDaniel P. Berrange <berrange@redhat.com>2011-12-19 11:08:10 +0000
commit7b87a30f1540a83d949327b1732c3f7082896e11 (patch)
tree7b8ab9ef24b6a3a2825c6b0c5efa5e8acb4d80ec /src/uml
parentAdd APIs to allow management of callbacks purely with virDomainEventState (diff)
downloadlibvirt-7b87a30f1540a83d949327b1732c3f7082896e11.tar.gz
libvirt-7b87a30f1540a83d949327b1732c3f7082896e11.tar.bz2
libvirt-7b87a30f1540a83d949327b1732c3f7082896e11.zip
Convert drivers to thread safe APIs for adding callbacks
* src/libxl/libxl_driver.c, src/lxc/lxc_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c: Convert to threadsafe APIs
Diffstat (limited to 'src/uml')
-rw-r--r--src/uml/uml_driver.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index 420488d8b..4d875c8e3 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -1194,8 +1194,8 @@ static int umlClose(virConnectPtr conn) {
struct uml_driver *driver = conn->privateData;
umlDriverLock(driver);
- virDomainEventCallbackListRemoveConn(conn,
- driver->domainEventState->callbacks);
+ virDomainEventStateDeregisterConn(conn,
+ driver->domainEventState);
umlProcessAutoDestroyRun(driver, conn);
umlDriverUnlock(driver);
@@ -2447,9 +2447,9 @@ umlDomainEventRegister(virConnectPtr conn,
int ret;
umlDriverLock(driver);
- ret = virDomainEventCallbackListAdd(conn,
- driver->domainEventState->callbacks,
- callback, opaque, freecb);
+ ret = virDomainEventStateRegister(conn,
+ driver->domainEventState,
+ callback, opaque, freecb);
umlDriverUnlock(driver);
return ret;
@@ -2483,10 +2483,10 @@ umlDomainEventRegisterAny(virConnectPtr conn,
int ret;
umlDriverLock(driver);
- if (virDomainEventCallbackListAddID(conn,
- driver->domainEventState->callbacks,
- dom, eventID,
- callback, opaque, freecb, &ret) < 0)
+ if (virDomainEventStateRegisterID(conn,
+ driver->domainEventState,
+ dom, eventID,
+ callback, opaque, freecb, &ret) < 0)
ret = -1;
umlDriverUnlock(driver);