Why is there an argument returned in the function below (of hvm.h), knowing that there is void? static inline void hvm_init_ap_context(struct vcpu_guest_context *ctxt, int vcpuid, int trampoline_vector) { return hvm_funcs.init_ap_context(ctxt, vcpuid, trampoline_vector); } _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> -----Original Message----- > From: xen-devel-bounces@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of > PUCCETTI Armand > Sent: 01 March 2007 16:43 > To: xen-devel@lists.xensource.com > Subject: [Xen-devel] hvm_init_ap_contexts > > Why is there an argument returned in the function below (of hvm.h), > knowing that there is void? > > static inline void > hvm_init_ap_context(struct vcpu_guest_context *ctxt, > int vcpuid, int trampoline_vector) > { > return hvm_funcs.init_ap_context(ctxt, vcpuid, trampoline_vector); > }Seems broken (or rather "unnecessar and confusing" to me - fancy submitting a fix?>From what I can tell, this has been "broken" for quite some time, and asof about 2000 changesets, the return-type of that function hasn''t changed. -- Mats> > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
The return keyword is pointless here, but allowed. -- Keir On 1/3/07 16:42, "PUCCETTI Armand" <armand.puccetti@cea.fr> wrote:> Why is there an argument returned in the function below (of hvm.h), > knowing that there is void? > > static inline void > hvm_init_ap_context(struct vcpu_guest_context *ctxt, > int vcpuid, int trampoline_vector) > { > return hvm_funcs.init_ap_context(ctxt, vcpuid, trampoline_vector); > }_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> -----Original Message----- > From: xen-devel-bounces@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of > Keir Fraser > Sent: 01 March 2007 17:00 > To: PUCCETTI Armand; xen-devel@lists.xensource.com > Subject: Re: [Xen-devel] hvm_init_ap_contexts > > The return keyword is pointless here, but allowed.Agreed - but removing the return keyword would make sure that someone looking at the code doesn''t try to figure out what is being returned by the original function - and since there''s nothing being returned, not using a return keyword makes the code "clearer". My personal opinion, of course. -- Mats> > -- Keir > > On 1/3/07 16:42, "PUCCETTI Armand" <armand.puccetti@cea.fr> wrote: > > > Why is there an argument returned in the function below (of hvm.h), > > knowing that there is void? > > > > static inline void > > hvm_init_ap_context(struct vcpu_guest_context *ctxt, > > int vcpuid, int trampoline_vector) > > { > > return hvm_funcs.init_ap_context(ctxt, vcpuid, > trampoline_vector); > > } > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
hi I try to understand the scheduler part code of xen,and I am confused about the poll_timer could you help me by telling me about the meaning and function of poll_timer struct vcpu { .... struct timer poll_timer; /* timeout for SCHEDOP_poll */ .... } Thanks in advance _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi, Have you ever seen the do_pci_op() of linux-2.6-sparse/drivers/xen/pcifront/pci_op.c? Thanks Atsushi SAKAI tgh <tianguanhua@ncic.ac.cn> wrote:> hi > I try to understand the scheduler part code of xen,and I am confused > about the poll_timer > could you help me by telling me about the meaning and function of poll_timer > > > struct vcpu { > .... > struct timer poll_timer; /* timeout for SCHEDOP_poll */ > .... > } > > Thanks in advance > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Thank you for your reply I read to the function do_pci_op() you told me,but I am not familiar with the pci facility I guess the poll_timer gives a interval for pci probing before time out or something could you tell me more about pci and poll_timer Thank you in advance Atsushi SAKAI 写道:> Hi, > > Have you ever seen the do_pci_op() of > linux-2.6-sparse/drivers/xen/pcifront/pci_op.c? > > Thanks > Atsushi SAKAI > > > tgh <tianguanhua@ncic.ac.cn> wrote: > > >> hi >> I try to understand the scheduler part code of xen,and I am confused >> about the poll_timer >> could you help me by telling me about the meaning and function of poll_timer >> >> >> struct vcpu { >> .... >> struct timer poll_timer; /* timeout for SCHEDOP_poll */ >> .... >> } >> >> Thanks in advance >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel >> > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> Thank you for your reply > I read to the function do_pci_op() you told me,but I am not familiar > with the pci facility > I guess the poll_timer gives a interval for pci probing before time out > or something > could you tell me more about pci and poll_timer > > Thank you in advance > > Atsushi SAKAI 写道:ISTR that the poll_timer is used to "Don''t schedule me until an event comes in, or if the event hasn''t arrived within this timeout" It''s a bit like the poll() system call in this respect. HTH, Cheers, Mark> > > > Have you ever seen the do_pci_op() of > > linux-2.6-sparse/drivers/xen/pcifront/pci_op.c? > > > > Thanks > > Atsushi SAKAI > > > > tgh <tianguanhua@ncic.ac.cn> wrote: > >> hi > >> I try to understand the scheduler part code of xen,and I am confused > >> about the poll_timer > >> could you help me by telling me about the meaning and function of > >> poll_timer > >> > >> > >> struct vcpu { > >> .... > >> struct timer poll_timer; /* timeout for SCHEDOP_poll */ > >> .... > >> } > >> > >> Thanks in advance > >> > >> _______________________________________________ > >> Xen-devel mailing list > >> Xen-devel@lists.xensource.com > >> http://lists.xensource.com/xen-devel > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel-- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel