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 17/35] Segment register changes for Xen

To: Andi Kleen <ak@xxxxxxx>
Subject: [Xen-devel] Re: [RFC PATCH 17/35] Segment register changes for Xen
From: Pavel Machek <pavel@xxxxxxx>
Date: Wed, 10 May 2006 22:30:15 +0200
Cc: Chris Wright <chrisw@xxxxxxxxxxxx>, virtualization@xxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>
Delivery-date: Thu, 11 May 2006 02:25:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200605102209.05004.ak@xxxxxxx>
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: <20060509084945.373541000@xxxxxxxxxxxx> <20060509085154.802230000@xxxxxxxxxxxx> <20060509071640.GA4150@xxxxxx> <200605102209.05004.ak@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11+cvs20060126
On St 10-05-06 22:09:04, Andi Kleen wrote:
> On Tuesday 09 May 2006 09:16, Pavel Machek wrote:
> > Hi!
> > 
> > > --- linus-2.6.orig/include/asm-i386/mach-default/mach_system.h
> > > +++ linus-2.6/include/asm-i386/mach-default/mach_system.h
> > > @@ -1,6 +1,8 @@
> > >  #ifndef __ASM_MACH_SYSTEM_H
> > >  #define __ASM_MACH_SYSTEM_H
> > >  
> > > +#define clearsegment(seg)
> > 
> > do {} while (0), please.
> 
> It's not needed. Think about it.

Really? If someone does 

        if (something)
                clearsegment(seg)
        somethingelse();

... he'll get very confusing behaviour instead of compile error. 

Okay, that's weaker argument than expected...

Also clearsegment(x) clearsegment(y); will compile when it should not.

Also clearsegment(i++) will behave strangely. So perhaps 

#define clearsegment(seg) do { seg; } while (0)

is best variant?
                                                                Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

<Prev in Thread] Current Thread [Next in Thread>