From: Ian Jackson Subject: Re: [PATCH 01/11] mini-os: Make some headers more rumpkernel-friendly Date: Mon, 23 Jun 2014 15:24:39 +0100 Message-ID: <21416.14503.833735.816785@mariner.uk.xensource.com> References: <1403291090-8657-1-git-send-email-ian.jackson@eu.citrix.com> <1403291090-8657-2-git-send-email-ian.jackson@eu.citrix.com> <53A8023B.6040300@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wz5Ap-0003Gb-LM for xen-devel@lists.xenproject.org; Mon, 23 Jun 2014 14:24:43 +0000 In-Reply-To: <53A8023B.6040300@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: xen-devel@lists.xenproject.org, Keir Fraser , Ian Campbell , Samuel Thibault List-Id: xen-devel@lists.xenproject.org (Fixed Keir's address. Sorry, Keir.) Andrew Cooper writes ("Re: [Xen-devel] [PATCH 01/11] mini-os: Make some headers more rumpkernel-friendly"): > On 20/06/14 20:04, Ian Jackson wrote: > > -#if __GNUC__ == 2 && __GNUC_MINOR__ < 96 > > -#define __builtin_expect(x, expected_value) (x) > > -#endif > > +#define smp_processor_id() 0 > > #define unlikely(x) __builtin_expect((x),0) > > #define likely(x) __builtin_expect((x),1) > > Not relevant to the patch itself, but as identified in c/s e5545fb6d0, > these constructs are buggy. Oh, yes. Joy. I don't propose to do anything about that in rumpuser-xen's minios at this stage. > > -#define smp_processor_id() 0 > > +#include > > + > > +#ifndef __RUMP_KERNEL__ > > + > > +#if __GNUC__ == 2 && __GNUC_MINOR__ < 96 > > +#define __builtin_expect(x, expected_value) (x) > > +#endif > > Do we honestly care about compilers this old? No. This is just code motion, though. Thanks, Ian.