|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/4] libxl: add sched_get_id function
To get the name of the currently used scheduler, Xen provides a sched_id sysctl. Add a libxl wrapper around the libxc function to query this. Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx> -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 488-3567-12 diff -r 7ee8bb40200a tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Thu Apr 15 19:11:16 2010 +0100
+++ b/tools/libxl/libxl.c Sun Apr 18 14:37:44 2010 +0200
@@ -2421,3 +2421,13 @@
}
return 0;
}
+
+int libxl_get_sched_id(struct libxl_ctx *ctx)
+{
+ int sched, ret;
+
+ if ((ret = xc_sched_id(ctx->xch, &sched)) != 0)
+ return -ret;
+ return sched;
+}
+
diff -r 7ee8bb40200a tools/libxl/libxl.h
--- a/tools/libxl/libxl.h Thu Apr 15 19:11:16 2010 +0100
+++ b/tools/libxl/libxl.h Sun Apr 18 14:37:44 2010 +0200
@@ -441,5 +441,7 @@
int libxl_set_vcpuaffinity(struct libxl_ctx *ctx, uint32_t domid, uint32_t
vcpuid,
uint64_t *cpumap, int cpusize);
int libxl_set_vcpucount(struct libxl_ctx *ctx, uint32_t domid, uint32_t count);
+
+int libxl_get_sched_id(struct libxl_ctx *ctx);
#endif /* LIBXL_H */
_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |