[lkml]   [2000]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: spin_lock forgets to clobber memory and other smp fixes [was Re: [patch] waitqueue optimization, 2.4.0-test7]
    On Thu, 7 Sep 2000, Jamie Lokier wrote:

    >I tried it with two compilers, one older than yours and one newer:

    So maybe I'm just been unlucky/lucky (depends on the point of view :) or
    maybe we patched something I'm not aware of to make the kernel to compile

    > .ident "GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)"
    > .ident "GCC: (GNU) 2.96 20000724 (experimental)"
    >The command lines were:
    > gcc -S -O2 test4.c
    > kgcc -S -O2 test4.c
    >In both cases, the memory read occurs before "zzz".

    andrea@inspiron:~ > cat p.c
    int *p;
    int func()
    int x;
    x = *p;
    __asm__ __volatile__ ("" : : );
    x = *p;
    return x;
    andrea@inspiron:~ > gcc -O2 -S p.c
    andrea@inspiron:~ > cat p.s
    .file "p.c"
    .version "01.01"
    .align 16
    .globl func
    .type func,@function
    pushl %ebp
    movl %esp,%ebp
    movl p,%eax
    movl %ebp,%esp
    popl %ebp
    movl (%eax),%eax
    .size func,.Lfe1-func
    .comm p,4,4
    .ident "GCC: (GNU) 2.95.2 19991024 (release)"


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:38    [W:0.024 / U:78.748 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site