From: Brendan Cully <brendan@cs.ubc.ca>
To: Julian Stecklina <der_julian@web.de>
Cc: xen-devel@lists.xensource.com
Subject: Re: Event Channels
Date: Fri, 12 Jan 2007 11:29:23 -0800 [thread overview]
Message-ID: <20070112192923.GB4982@ventoux.cs.ubc.ca> (raw)
In-Reply-To: <eo8k9g$l7i$1@sea.gmane.org>
On Friday, 12 January 2007 at 19:33, Julian Stecklina wrote:
> 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.
According to the interface guide
http://www.cl.cam.ac.uk/research/srg/netos/xen/readmes/interface/interface.html#SECTION00600000000000000000
the event is masked until the receiver clears the notification. I
think you do this by sending a notify back along the same port:
while (1) {
evtchn_port_t port;
port = xc_evtchn_pending(ev);
printf("%u\n", port);
xc_evtchn_notify(ev, port);
xc_evtchn_unmask(ev, port);
}
next prev parent reply other threads:[~2007-01-12 19:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-12 18:33 Event Channels Julian Stecklina
2007-01-12 19:03 ` Mark Williamson
2007-01-18 13:02 ` Julian Stecklina
2007-01-12 19:29 ` Brendan Cully [this message]
-- 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=20070112192923.GB4982@ventoux.cs.ubc.ca \
--to=brendan@cs.ubc.ca \
--cc=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.