From: Keir Fraser Subject: Re: suggested event channel cleanups Date: Tue, 11 Oct 2005 10:18:08 +0100 Message-ID: <15b139949e0431d9d15bd83305478c52@cl.cam.ac.uk> References: <44BDAFB888F59F408FAE3CC35AB47041022BD367@orsmsx409> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <44BDAFB888F59F408FAE3CC35AB47041022BD367@orsmsx409> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "King, Steven R" Cc: xen-devel List List-Id: xen-devel@lists.xenproject.org On 10 Oct 2005, at 23:50, King, Steven R wrote: > This patch standardizes the type of "port" to "int" for event channel > functions and structures. Internally, Xen is using "int" for ports, > but > userland code has a mix of "int" and "u32". Type "int" is preferred in > userland, since some functions want to return a positive port value or > a > negative error code. Userspace may do this, but Xen doesn't. It makes sense to give those fields an unsigned type because Xen will never return a negative value. If higher-level interfaces outside Xen return a signed type, with -ve indicating error, there's no reason for Xen to do the same. > xenctrl.h: Added extern "C" to allow linking with C++ programs. Isn't it quite normal to put the ''extern "C"' in the C++ program itself when including C header files? > xenctrl.h: Added function prototype for event channel close. > xenctrl.h: Added function prototype for interdomain event channel. These were removed last week.; The correct interface for user-space programs is now ioctls via /dev/xen/evtchn. See examples of its use in console/daemon/io.c, for example. > I've never offered up a patch before, so apologies if I'm abusing > conventions. There's nothing wrong with the format of the patch. :-) -- Keir