Introduces following functions in Xenctrl and associated types:
get_system_cpu_policy
cpu_policy_to_featureset,
string_of_xen_cpu_policy_index
These are wrappers around the existing C functions in xenctrl.h,
that will be used by xenopsd initially.
-Wno-declaration-after-statement is disabled to allow mixing
declarations and code to simplify writing the stubs
by using variable length arrays on the stack instead of
allocating/freeing memory
(which would require additional error-handling logic).
Signed-off-by: Edwin Török <
edvin.torok@xxxxxxxxxx>
---
tools/ocaml/libs/xc/Makefile | 2 +-
tools/ocaml/libs/xc/xenctrl.ml | 37 ++++++
tools/ocaml/libs/xc/xenctrl.mli | 71 ++++++++++
tools/ocaml/libs/xc/xenctrl_stubs.c | 195 ++++++++++++++++++++++++++++
4 files changed, 304 insertions(+), 1 deletion(-)