[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Some questions about Wrting XenStore Code!~~


  • To: "吴佳民" <wujiamin_tyut@xxxxxxx>
  • From: "Derek Murray" <Derek.Murray@xxxxxxxxxxxx>
  • Date: Fri, 4 Jul 2008 09:32:39 +0200
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 04 Jul 2008 00:34:16 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references:x-google-sender-auth; b=nE33lRNXjLnkwIV99sPfvxWXz3HNVkydjU1kwjjTm8MupvyVvtLou4GNncy64xL1/b CrB5Du/SI05j0Uv1Z6/PFI8gZ3AwrH8ROv31m2TlTMyjVkqp+oW/4c7JkdLYpQfMkmPU pAr/Z1mGAnzJYfR9DhPmNfzyUV2g4OLpJn0zQ=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hi,

To access XenStore from a userspace process, you should use the
functions in libxs, as can be found in $XEN_ROOT/tools/xenstore/xs.h.
The contents of xsls.c in the same directory should give you an idea
of how to connect to and use the store - note that you do not need the
shared_info_t structure or any direct hypercalls.

Regards,

Derek Murray.

2008/7/4 吴佳民 <wujiamin_tyut@xxxxxxx>:
> Hi:
>     I am  now writing code about using XenStore to write some (keys, values)
> on Dom0.
>     my code is as follows:
>
> //filename: w_main.h
>
> #include "w_xenstore.h"
> //The "w_xenstore.h" is a header file I write myself
>
> #include <x86_mm.h>
>
> extern shared_info_t * shared_info;
>
> int main(void)
> {
>     /* Set up the XenStore driver */
>     xenstore_init(start_info);
>     /* Test the store */
>     xenstore_test();
>     /* Flush the console buffer */
>
>     return 0;
> }
>
> and I know that if I wanna use xenStore, I have to use shared_info_t *
> shared_info. When I compile the code, it tells me that shared_info is not
> stated before using.
>
> my question is :
> (1)
> How to get a pointer to shared_info_t structure in my program (running in
> Userspace)?
>
> (2) I can not include ":hypercall-x86_32.h" and "x86_mm.h" , and I really
> can not find these two files on my machine.What is the problem?
>
> Thanks a lot!
>
>
> Danius Wu
> ================================================================
>
>
>
> ________________________________
> 350万起 独栋山墅
> _______________________________________________
> 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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.