|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC 3/8] golang/xenlight: Add host-related functionality
On 23/01/17 16:43, Ronald Rojas wrote:
> Add calls for the following host-related functionality:
> - libxl_get_max_cpus
> - libxl_get_online_cpus
> - libxl_get_max_nodes
> - libxl_get_free_memory
> - libxl_get_physinfo
> - libxl_get_version_info
>
> Include Golang versions of the following structs:
> - libxl_physinfo as Physinfo
> - libxl_version_info as VersionInfo
> - libxl_hwcap as Hwcap
>
> Signed-off-by: Ronald Rojas <ronladred@xxxxxxxxx>
> ---
> tools/golang/xenlight/xenlight.go | 186
> ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 186 insertions(+)
>
> diff --git a/tools/golang/xenlight/xenlight.go
> b/tools/golang/xenlight/xenlight.go
> index eee2254..92410a8 100644
> --- a/tools/golang/xenlight/xenlight.go
> +++ b/tools/golang/xenlight/xenlight.go
> @@ -108,6 +108,63 @@ type Context struct {
> ctx *C.libxl_ctx
> }
>
> +type Hwcap []C.uint32_t
> +
> +func (chwcap C.libxl_hwcap)CToGo() (ghwcap Hwcap) {
Sorry... I'm coming back to this after a bit of time and remembering a
bunch of things as I'm going along.
I don't think we want this method to be available publicly, so this
should probably be 'cToGo' (Or perhaps just 'toGo', since it's already a
C structure.)
-George
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |