[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Event Channels



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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.