All of lore.kernel.org
 help / color / mirror / Atom feed
* xe timer
@ 2015-03-19 23:41 HANNAS YAYA Issa
  2015-03-20  9:51 ` Ian Campbell
  0 siblings, 1 reply; 2+ messages in thread
From: HANNAS YAYA Issa @ 2015-03-19 23:41 UTC (permalink / raw)
  To: xen-devel

Hello
I want to implement in xen hypervisor but I don't know how to do it. I 
search in google but I do not found how to use the xen timer (not 
linux).
when I compile xen the timer run only once. here is my code.

static void timer_handler(void *unused)
{
	printk("hello world in timer\n");
}
static struct timer *domain_timer;

somewhere in my xen source I initialise the timer:

domain_timer = xmalloc(struct timer);
init_timer(domain_timer, timer_handler,NULL,0);
set_timer(domain_timer, SECONDS(60));

please can anybody explain what is wrong in my code

Thank you

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: xe timer
  2015-03-19 23:41 xe timer HANNAS YAYA Issa
@ 2015-03-20  9:51 ` Ian Campbell
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2015-03-20  9:51 UTC (permalink / raw)
  To: HANNAS YAYA Issa; +Cc: xen-devel

On Fri, 2015-03-20 at 00:41 +0100, HANNAS YAYA Issa wrote:
> when I compile xen the timer run only once.

I believe Xen timers are one-shot only. If you want a periodic timer
then you will need to rearm it at the end of your handler.

Check the plt_overflow_timer for an example of this sort of thing.

Ian.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-20  9:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-19 23:41 xe timer HANNAS YAYA Issa
2015-03-20  9:51 ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.