Re: Illegal use of reserved word in system.h

From: J.A. Magallon (jamagallon_at_able.es)
Date: 05/20/05

  • Next message: Al Viro: "[CFR][PATCH] namei fixes (2/19)"
    Date:	Thu, 19 May 2005 23:10:29 +0000
    To: linux-kernel@vger.kernel.org
    
    

    On 05.20, Russell King wrote:
    > On Thu, May 19, 2005 at 10:30:32PM +0000, J.A. Magallon wrote:
    > > Stupid and portable C++ code follows:
    > >...
    > > # ifdef __linux__
    > > strcpy(arch,"x86");
    >
    > These two appear to be self-contradictory, unless you define "portable"
    > to mean "x86 only"... which would be hardly portable.
    >

    Yup, portable to what I needed to port it ;). Will be refined...
    It was just a note about how to get info about ram, cpu, os and so on.
    Probably soft (MySQL) that needs to know on what processors is being built
    just needs to know on how many is being run to start a thread on each one,
    or know about the ram to size its caches...

    At build time, cpp -dM /dev/null:

    linux-x86:
    #define i386 1
    #define __i386 1
    #define __i386__ 1
    #define __tune_pentium__ 1
    #define __tune_i586__ 1

    darwin-ppc:
    #define __ppc__ 1

    But the interesting part would be how to know at runtime on what
    processor I'm running. Will have to look at x86info...

    --
    J.A. Magallon <jamagallon()able!es>     \               Software is like sex:
    werewolf!able!es                         \         It's better when it's free
    Mandriva Linux release 2006.0 (Cooker) for i586
    Linux 2.6.11-jam19 (gcc 4.0.0 (4.0.0-3mdk for Mandriva Linux release 2006.0))
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Al Viro: "[CFR][PATCH] namei fixes (2/19)"

    Relevant Pages

    • Re: VM fixes [2/4]
      ... > This is the forward port to 2.6 of the lowmem_reserved algorithm I ... > needed in all sort of workloads with lots of ram on x86, ... does potentially fix corner cases where lower zones get filled with un- ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [RFC][patch 0/2] mm: remove PageReserved
      ... that RAM has been "put aside" ... for use by fancy stuff and is de-facto out of control of the normal page ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)
    • Re: How do you accurately determine a process RAM usage?
      ... > I wrote a tool to report how much RAM a ... > So how can one determine how much RAM a process is using? ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)
    • Re: sata_nv + SMP = broken?
      ... Why would that only occur in SMP mode? ... >>the box is with 3G ram, no SMP and it works like a charm. ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)
    • Buffers permanently at 4k in top
      ... and 2GB RAM. ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)