WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Chris Wright <chrisw@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: [RFC PATCH 24/33] Add support for Xen event channels.
From: ramsdell@xxxxxxxxx (John D. Ramsdell)
Date: 18 Jul 2006 07:41:54 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 18 Jul 2006 04:42:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <E1G2m58-00012g-Es@host-192-168-0-1-bcn-london>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <E1G2m58-00012g-Es@host-192-168-0-1-bcn-london>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Re: [RFC PATCH 24/33] Add support for Xen event channels., John D. Ramsdell <=