Atomic operations (SPARC)

From: Alan Woodland (alan.woodland_at_gmail_dot_com)
Date: Mon Aug 24 2009 - 07:30:33 PDT

  • Next message: Paul H. Hargrove: "Re: Atomic operations (SPARC)"
    Hello,
    
    I just noticed building on SPARC is failing. Log of a failed build is:
    
    https://buildd.debian.org/fetch.cgi?pkg=blcr&arch=sparc&ver=0.8.2-3&stamp=1251122315&file=log&as=raw
    
     Debian builds for 'sparclite' apparently in a lowest common
    denominator strategy.
    
    This comes from the membar instruction in several functions in
    libcr/arch/sparc/cr_atomic.h right? It looks like there's half-written
    support for avoiding membar.
    
    Would it be feasible (and sensible?) for me to put together a patch
    that implements some/all of cr_atomic.h using these gcc builtins?
    http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
    Where hardware support exists they are translated into the appropriate
    instruction, where it doesn't they become a function call.
    
    Is there any reason not to use these builtins for all arches and avoid
    having to maintain a cr_atomic.h for every supported platform?
    
    Alan
    

  • Next message: Paul H. Hargrove: "Re: Atomic operations (SPARC)"