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

RE: [Xen-devel] [patch] pagetable cleanups

To: "Gerd Knorr" <kraxel@xxxxxxxxxxx>, "Michael A Fetterman" <Michael.Fetterman@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] [patch] pagetable cleanups
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Thu, 14 Apr 2005 16:11:55 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 14 Apr 2005 15:11:45 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcVBA3MDyU45+KUxR6KeOsNhVnHxqQAAJAOw
Thread-topic: [Xen-devel] [patch] pagetable cleanups
 

> > There's also no macros for creating L1E or L2E as 
> expressions -- only 
> > statements which assign them.  Perhaps this was 
> intentional?  It means 
> > that you end up declaring extra variables to hold essentially 
> > temporary values in a few places...
> 
> Yes, was intentionally.  I think that isn't bad, it makes the 
> code more readable.  And I think it actually is impossible to 
> return structs in C, you can only return a pointer to a 
> struct, which would't help for the "building entries as 
> expressions" case.

Returning structs is actually fine, at least on modern C
implementations.
Gcc seems to optimise for it OK.

Personally think having "a = foo(b,c)" is actually more readable than
"foo(&a,b,c)".

Ian

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