From: =?GBK?B?zuK80cPx?= Subject: Some questions about Wrting XenStore Code!~~ Date: Fri, 4 Jul 2008 08:37:39 +0800 (CST) Message-ID: <23702546.583191215131859204.JavaMail.coremail@bj163app114.163.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0154033362==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --===============0154033362== Content-Type: multipart/alternative; boundary="----=_Part_156178_11586843.1215131859203" ------=_Part_156178_11586843.1215131859203 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: quoted-printable 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 extern shared_info_t * shared_info; int main(void) { =20 /* Set up the XenStore driver */ xenstore_init(start_info); /* Test the store */ xenstore_test(); /* Flush the console buffer */ =20 =20 return 0; } =20 and I know that if I wanna use xenStore, I have to use shared_info_t * shar= ed_info. When I compile the code, it tells me that shared_info is not state= d before using. my question is : (1) How to get a pointer to shared_info_t structure in my program (running in U= serspace)? (2) I can not include "=A3=BAhypercall-x86_32.h" and "x86_mm.h" , and I rea= lly can not find these two files on my machine.What is the problem? Thanks a lot! = Danius Wu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ------=_Part_156178_11586843.1215131859203 Content-Type: text/html; charset=gbk Content-Transfer-Encoding: quoted-printable
Hi:
    I am  now writing code about using XenStore = to write some (keys, values) on Dom0.
    my code is as f= ollows:

//filename: w_main.h

#include "w_xenstore.h"//The "w_xenstore.h" is a header file I write myself

#include <x= 86_mm.h>

extern shared_info_t * shared_info;

int main(void= )
{    
    /* Set up the XenStore driv= er */
    xenstore_init(start_info);
   &nbs= p;/* Test the store */
    xenstore_test();
 &nbs= p;  /* Flush the console buffer */    
   =  
    return 0;
}
 
and I know that i= f I wanna use xenStore, I have to use shared_info_t * shared_info. When I c= ompile 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 stru= cture in my program (running in Userspace)?

(2) I can not include "= =A3=BAhypercall-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!

&n= bsp;            = ;            &n= bsp;            = ;            &n= bsp;            = ;            &n= bsp;          Danius Wu
=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D


=20
350=CD=F2=C6=F0 =B6=C0=B6= =B0=C9=BD=CA=FB ------=_Part_156178_11586843.1215131859203-- --===============0154033362== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0154033362==--