mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
libxc: convert evtchn interfaces to use an opaque handle type
This makes the interface consistent with the changes made to the main interface in 21483:779c0ef9682c. Also fix some references to "struct xc_interface" which should have been simply "xc_interface" in tools/xenpaging, and update QEMU_TAG to pull in the corresponding qemu change. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
252cb308e3
commit
3e446a35ee
30 files changed
+266
-229
No files matched your search
@@ -19,7 +19,7 @@ typedef enum {
|
||||
|
||||
typedef struct {
|
||||
xc_interface *xch;
|
||||
int xce; /* event channel handle */
|
||||
xc_evtchn *xce; /* event channel handle */
|
||||
struct xs_handle* xsh; /* xenstore handle */
|
||||
int watching_shutdown; /* state of watch on @releaseDomain */
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ char* checkpoint_error(checkpoint_state* s)
|
||||
void checkpoint_init(checkpoint_state* s)
|
||||
{
|
||||
s->xch = NULL;
|
||||
s->xce = -1;
|
||||
s->xce = NULL;
|
||||
s->xsh = NULL;
|
||||
s->watching_shutdown = 0;
|
||||
|
||||
@@ -89,8 +89,8 @@ int checkpoint_open(checkpoint_state* s, unsigned int domid)
|
||||
return -1;
|
||||
}
|
||||
|
||||
s->xce = xc_evtchn_open();
|
||||
if (s->xce < 0) {
|
||||
s->xce = xc_evtchn_open(NULL, 0);
|
||||
if (s->xce == NULL) {
|
||||
checkpoint_close(s);
|
||||
s->errstr = "could not open event channel handle";
|
||||
|
||||
@@ -149,9 +149,9 @@ void checkpoint_close(checkpoint_state* s)
|
||||
xc_interface_close(s->xch);
|
||||
s->xch = NULL;
|
||||
}
|
||||
if (s->xce >= 0) {
|
||||
if (s->xce != NULL) {
|
||||
xc_evtchn_close(s->xce);
|
||||
s->xce = -1;
|
||||
s->xce = NULL;
|
||||
}
|
||||
if (s->xsh) {
|
||||
xs_daemon_close(s->xsh);
|
||||
@@ -360,7 +360,7 @@ static int setup_suspend_evtchn(checkpoint_state* s)
|
||||
static void release_suspend_evtchn(checkpoint_state *s)
|
||||
{
|
||||
/* TODO: teach xen to clean up if port is unbound */
|
||||
if (s->xce >= 0 && s->suspend_evtchn >= 0) {
|
||||
if (s->xce != NULL && s->suspend_evtchn >= 0) {
|
||||
xc_suspend_evtchn_release(s->xch, s->xce, s->domid, s->suspend_evtchn);
|
||||
s->suspend_evtchn = -1;
|
||||
}
|
||||
|
||||