[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Added documentation and bindings for host_cpu.features.
# HG changeset patch # User Ewan Mellor <ewan@xxxxxxxxxxxxx> # Date 1176324905 -3600 # Node ID f3f4f4ca6f61e58fa3ed7eb9e9cb61c2f66102b4 # Parent 565b5662c880e81ab528e51a6c89dbe81e8154fe Added documentation and bindings for host_cpu.features. Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx> --- docs/xen-api/xenapi-datamodel.tex | 35 ++++++++++++++++++++++++++++++++++- tools/libxen/include/xen_host_cpu.h | 8 ++++++++ tools/libxen/src/xen_host_cpu.c | 21 +++++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) diff -r 565b5662c880 -r f3f4f4ca6f61 docs/xen-api/xenapi-datamodel.tex --- a/docs/xen-api/xenapi-datamodel.tex Tue Apr 10 19:04:37 2007 +0100 +++ b/docs/xen-api/xenapi-datamodel.tex Wed Apr 11 21:55:05 2007 +0100 @@ -6634,7 +6634,8 @@ Quals & Field & Type & Description \\ $\mathit{RO}_\mathit{run}$ & {\tt speed} & int & the speed of the physical CPU \\ $\mathit{RO}_\mathit{run}$ & {\tt modelname} & string & the model name of the physical CPU \\ $\mathit{RO}_\mathit{run}$ & {\tt stepping} & string & the stepping of the physical CPU \\ -$\mathit{RO}_\mathit{run}$ & {\tt flags} & string & the flags of the physical CPU \\ +$\mathit{RO}_\mathit{run}$ & {\tt flags} & string & the flags of the physical CPU (a decoded version of the features field) \\ +$\mathit{RO}_\mathit{run}$ & {\tt features} & string & the physical CPU feature bitmap \\ $\mathit{RO}_\mathit{run}$ & {\tt utilisation} & float & the current CPU utilisation \\ \hline \end{longtable} @@ -6891,6 +6892,38 @@ Get the flags field of the given host\_c \noindent {\bf Signature:} \begin{verbatim} string get_flags (session_id s, host_cpu ref self)\end{verbatim} + + +\noindent{\bf Arguments:} + + +\vspace{0.3cm} +\begin{tabular}{|c|c|p{7cm}|} + \hline +{\bf type} & {\bf name} & {\bf description} \\ \hline +{\tt host\_cpu ref } & self & reference to the object \\ \hline + +\end{tabular} + +\vspace{0.3cm} + + \noindent {\bf Return Type:} +{\tt +string +} + + +value of the field +\vspace{0.3cm} +\vspace{0.3cm} +\vspace{0.3cm} +\subsubsection{RPC name:~get\_features} + +{\bf Overview:} +Get the features field of the given host\_cpu. + + \noindent {\bf Signature:} +\begin{verbatim} string get_features (session_id s, host_cpu ref self)\end{verbatim} \noindent{\bf Arguments:} diff -r 565b5662c880 -r f3f4f4ca6f61 tools/libxen/include/xen_host_cpu.h --- a/tools/libxen/include/xen_host_cpu.h Tue Apr 10 19:04:37 2007 +0100 +++ b/tools/libxen/include/xen_host_cpu.h Wed Apr 11 21:55:05 2007 +0100 @@ -70,6 +70,7 @@ typedef struct xen_host_cpu_record char *modelname; char *stepping; char *flags; + char *features; double utilisation; } xen_host_cpu_record; @@ -223,6 +224,13 @@ xen_host_cpu_get_flags(xen_session *sess /** + * Get the features field of the given host_cpu. + */ +extern bool +xen_host_cpu_get_features(xen_session *session, char **result, xen_host_cpu host_cpu); + + +/** * Get the utilisation field of the given host_cpu. */ extern bool diff -r 565b5662c880 -r f3f4f4ca6f61 tools/libxen/src/xen_host_cpu.c --- a/tools/libxen/src/xen_host_cpu.c Tue Apr 10 19:04:37 2007 +0100 +++ b/tools/libxen/src/xen_host_cpu.c Wed Apr 11 21:55:05 2007 +0100 @@ -61,6 +61,9 @@ static const struct_member xen_host_cpu_ { .key = "flags", .type = &abstract_type_string, .offset = offsetof(xen_host_cpu_record, flags) }, + { .key = "features", + .type = &abstract_type_string, + .offset = offsetof(xen_host_cpu_record, features) }, { .key = "utilisation", .type = &abstract_type_float, .offset = offsetof(xen_host_cpu_record, utilisation) } @@ -90,6 +93,7 @@ xen_host_cpu_record_free(xen_host_cpu_re free(record->modelname); free(record->stepping); free(record->flags); + free(record->features); free(record); } @@ -252,6 +256,23 @@ xen_host_cpu_get_flags(xen_session *sess bool +xen_host_cpu_get_features(xen_session *session, char **result, xen_host_cpu host_cpu) +{ + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = host_cpu } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("host_cpu.get_features"); + return session->ok; +} + + +bool xen_host_cpu_get_utilisation(xen_session *session, double *result, xen_host_cpu host_cpu) { abstract_value param_values[] = _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |