|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] OCaml compilation issues (staging) under ARM32 (ocaml-4.01)
On 13/04/2016 21:28, Konrad Rzeszutek Wilk wrote:
> Hey,
>
> As I was testing xSplice I had compile issues to Andrew's CPUID work
> which was easy to fix:
>
> diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c
> b/tools/ocaml/libs/xc/xenctrl_stubs.c
> index 5477df3..881f1b4 100644
> --- a/tools/ocaml/libs/xc/xenctrl_stubs.c
> +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
> @@ -1216,8 +1216,9 @@ CAMLprim value stub_xc_domain_deassign_device(value
> xch, value domid, value desc
>
> CAMLprim value stub_xc_get_cpu_featureset(value xch, value idx)
> {
> - CAMLparam2(xch, idx);
> CAMLlocal1(bitmap_val);
> +#if defined(__i386__) || defined(__x86_64__)
> + CAMLparam2(xch, idx);
The CAMLparam2 is mandatory. Even if the function has no arguments, you
need a CAMLparam0 to do prolog interaction with the runtime.
>
> /* Safe, because of the global ocaml lock. */
> static uint32_t fs_len;
> @@ -1245,7 +1246,9 @@ CAMLprim value stub_xc_get_cpu_featureset(value xch,
> value idx)
> for (i = 0; i < len; ++i)
> Store_field(bitmap_val, i, caml_copy_int64(fs[i]));
> }
> -
> +#else
> + caml_failwith("xc_domain_cpuid_set: not implemented");
That would be "xc_get_cpu_featureset" rather than set, and you also need
to set ENOSYS in the xch last error.
OTOH, caml_failwith() is Noreturn, so you can use it without a
subsequent return statement.
> +#endif
> CAMLreturn(bitmap_val);
> }
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |