> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
[SNIP]
>
> 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 :
apr_atomic_cas::
mf
sxt4 r9 = r33
add r8 = 0, r34
sxt4 ar.ccv = r34
cmpxchg4.acq r8 = [r32], r9, ar.ccv
mf
br.ret.sptk.many rp ;;
.endp apr_atomic_cas
-Madhu