apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" <mad...@hp.com>
Subject RE: apr_atomic stuff... desireable to return values from more fu nctions
Date Thu, 04 Dec 2003 06:51:38 GMT

> -----Original Message-----
> From: gregames@apache.org [mailto:gregames@apache.org]

> We could use that to implement a lock-free post log in 
> mod_specweb99, along with 
> some shared memory stuff.  I think Madhu would be interested, 
> given his recent 
> encounter with SysV sems :)

Oh yes - definitely. Infact, I'm in the process of replacing sysV sem with
global mutex to see if it helps solve my problems in mod_specweb99. We can
probably replace those semlocks with apr_atomic() in mod_specweb99.

BTW, I did some work (reeeally long time ago) to get atomic stuff in
assembly for IA64 - I was partially successful in the process though.. I got
the CAS to work (huh - pretty easy stuff) but I ran into problems with
atomic add/subtract (mainly thread safety issues).

Based on the atomic code today, I'm not sure if ppl. are willing to put the
ia64 assembly specific things in the code (moreover, it might require 'as'
to compile and cannot/willnot work with gcc)

The ia64 CAS code looks as simple as :

        sxt4            r9 = r33
        add             r8 = 0, r34
        sxt4            ar.ccv = r34
        cmpxchg4.acq    r8 = [r32], r9, ar.ccv
        br.ret.sptk.many rp                     ;;
        .endp   apr_atomic_cas


View raw message