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

[Xen-devel] Re: [RFC PATCH 24/33] Add support for Xen event channels.



Chris,

I read with interest your patch for adding support for Xen event
channels.  I notice that evtchn.h uses an int to represent a port, as
demonstrated, for example, in the following two declarations:

> +extern void mask_evtchn(int port);
> +extern void unmask_evtchn(int port);

Using a signed integer is good because negative numbers can be use to
return error conditions from functions that cannot be confused with
valid port numbers.

For code used within Mini-OS, I've been using evtchn_port_t, which is
defined in xen-unstable/xen/include/public/event_channel.h as:

  typedef uint32_t evtchn_port_t;

Is there a plan to harmonize this representation of a port with yours,
and make it a signed integer?

I also notice that xen-unstable/xen/include/public/grant_table.h
defines grant_ref_t and grant_handle_t to be unsigned.  Once again,
having a representation of these items that unambiguously represent
error codes and not valid data seems to me to be very useful.

John

_______________________________________________
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®.