[Python-Dev] Re: [Thread-SIG] optimize atomic inc/dec? (was: baby steps for free-threading)

Harri Pasanen harri.pasanen@trema.com
Thu, 20 Apr 2000 09:42:29 +0200


Greg Stein wrote, talking about optimizing atomic inc/dec:
> 
> For example, when we see we're using GCC on an x86 processor (whether
> FreeBSD or Linux), we can define atomic_inc() as an __asm fragment.
> 

The same applies for Sparc.  In our C++ software we have currently the
atomic increment as inlined assembly for x86, sparc and sparc-v9, using
GCC.  It is a function though, so there is a function call involved.

-Harri