WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 7 of 7] [OCAML] Small improvement to the ocaml xe

To: Jon Ludlam <jonathan.ludlam@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 7 of 7] [OCAML] Small improvement to the ocaml xenctrl library
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Fri, 30 Sep 2011 08:54:32 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 30 Sep 2011 00:55:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <abf14d22106aad906f31.1317331049@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <patchbomb.1317331042@xxxxxxxxxxxxxxxxxxxxxxxxxx> <abf14d22106aad906f31.1317331049@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2011-09-29 at 22:17 +0100, Jon Ludlam wrote:
> Add a new field 'max_nr_cpus' to the physinfo type in the ocaml xc bindings
> 
> Signed-off-by: Zheng Li <zheng.li@xxxxxxxxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

> 
> diff -r 05ac32c3956c -r abf14d22106a tools/ocaml/libs/xc/xc.ml
> --- a/tools/ocaml/libs/xc/xc.ml
> +++ b/tools/ocaml/libs/xc/xc.ml
> @@ -70,6 +70,7 @@
>       scrub_pages      : nativeint;
>       (* XXX hw_cap *)
>       capabilities     : physinfo_cap_flag list;
> +     max_nr_cpus      : int;
>  }
>  
>  type version =
> diff -r 05ac32c3956c -r abf14d22106a tools/ocaml/libs/xc/xc.mli
> --- a/tools/ocaml/libs/xc/xc.mli
> +++ b/tools/ocaml/libs/xc/xc.mli
> @@ -52,6 +52,7 @@
>    free_pages       : nativeint;
>    scrub_pages      : nativeint;
>    capabilities     : physinfo_cap_flag list;
> +  max_nr_cpus      : int; (** compile-time max possible number of nr_cpus *)
>  }
>  type version = { major : int; minor : int; extra : string; }
>  type compile_info = {
> diff -r 05ac32c3956c -r abf14d22106a tools/ocaml/libs/xc/xc_stubs.c
> --- a/tools/ocaml/libs/xc/xc_stubs.c
> +++ b/tools/ocaml/libs/xc/xc_stubs.c
> @@ -534,6 +534,7 @@
>  
>       if (retval)
>               failwith_xc(_H(xch));
> +
>       ring[size] = '\0';
>       CAMLreturn(caml_copy_string(ring));
>  }
> @@ -573,7 +574,7 @@
>               }
>       }
>  
> -     physinfo = caml_alloc_tuple(9);
> +     physinfo = caml_alloc_tuple(10);
>       Store_field(physinfo, 0, Val_int(c_physinfo.threads_per_core));
>       Store_field(physinfo, 1, Val_int(c_physinfo.cores_per_socket));
>       Store_field(physinfo, 2, Val_int(c_physinfo.nr_cpus));
> @@ -583,6 +584,7 @@
>       Store_field(physinfo, 6, caml_copy_nativeint(c_physinfo.free_pages));
>       Store_field(physinfo, 7, caml_copy_nativeint(c_physinfo.scrub_pages));
>       Store_field(physinfo, 8, cap_list);
> +     Store_field(physinfo, 9, Val_int(c_physinfo.max_cpu_id + 1));
>  
>       CAMLreturn(physinfo);
>  }
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel