Skip to contentSkip to conversation

libxenlight: use watch and select in libxl_wait_for_device_model

PATCH New Stefano Stabellini 1 participant 1 message Dec 2, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxenlight: use watch and select in libxl_wait_for_device_model

Hi all,
this patch reimplements libxl_wait_for_device_model using a xenstore watch and a select loop.

---

tools/libxl/libxl.c +1 -0
diff -r 40077a808001 tools/libxl/libxl.c
@@ -888,6 +888,7 @@
         *starting_r = libxl_calloc(ctx, sizeof(libxl_device_model_starting), 1);
         if (!*starting_r) goto xit;
         p = *starting_r;
+        p->for_spawn = libxl_calloc(ctx, sizeof(struct libxl_spawn_starting), 1);
     } else {
         p = &buf_starting;
         p->for_spawn = NULL;
tools/libxl/libxl_device.c +33 -17

64 lines not on this page · raw message

tools/libxl/libxl_internal.h +1 -0
diff -r 40077a808001 tools/libxl/libxl_internal.h
@@ -28,6 +28,7 @@
 #include "libxl_utils.h"
 
 #define LIBXL_DESTROY_TIMEOUT 10
+#define LIBXL_DEVICE_MODEL_START_TIMEOUT 10
 #define LIBXL_XENCONSOLE_LIMIT 1048576
 #define LIBXL_XENCONSOLE_PROTOCOL "vt100"
 #define QEMU_SIGNATURE "QemuDeviceModelRecord"