All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julian Stecklina <der_julian@web.de>
To: xen-devel@lists.xensource.com
Subject: Event Channels
Date: Fri, 12 Jan 2007 19:33:19 +0100	[thread overview]
Message-ID: <eo8k9g$l7i$1@sea.gmane.org> (raw)

Hello,

in an application I develop, event channel semantics seem a bit odd to 
me. Consider the following scenario: A Mini-OS binds an unbound port for
domain 0 and issues a notification every second:

	evtchn_alloc_unbound(0, msg_handler, NULL,
			     &port);

	printk("%u %u %u\n", domid, port);

	while (1) {
		sleep(1000);
		notify_remote_via_evtchn(port);
	}

A Linux program running on Domain 0 calls bind_interdomain using domid
and port to obtain local_port and watches for pending notifications:

	evtchn_port_t local_port = xc_evtchn_bind_interdomain(ev, domid, port);

	while (1) {
		evtchn_port_t port;

		port = xc_evtchn_pending(ev);
		printf("%u\n", port);
		xc_evtchn_unmask(ev, port);
	}

Now what I do not understand is, why the Linux program sees exactly one
notification and then indefinitely blocks. Any help on what I may be 
doing wrong is greatly appreciated. This is with xen-3.0.4-testing.

Regards,
Julian

             reply	other threads:[~2007-01-12 18:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-12 18:33 Julian Stecklina [this message]
2007-01-12 19:03 ` Event Channels Mark Williamson
2007-01-18 13:02   ` Julian Stecklina
2007-01-12 19:29 ` Brendan Cully
  -- strict thread matches above, loose matches on Subject: below --
2010-09-15 20:37 Srujan D. Kotikela
2007-05-04 20:05 Koripella Srinivas
2007-05-05  8:23 ` Keir Fraser
2006-02-27  2:17 event channels Tian, Kevin
2006-02-27  0:48 jaikumar Ganesh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='eo8k9g$l7i$1@sea.gmane.org' \
    --to=der_julian@web.de \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.