httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakub Jelinek ...@sunsite.ms.mff.cuni.cz>
Subject Re: help with a concurrency locking problem?
Date Fri, 24 May 1996 12:05:15 GMT
> 
> 	Thanks for all the input. Do you know if intel has the atomic
> test & set? (I'm on a pentium.) 
>From 486+, lock; cmpxchgl. You have to fill %%eax with the value you want to
test for and you issue
movl $value,%%eax
lock
cmpxchgl location,%%edx 
(or whatever noneax register is suitable).
This does
if (*location == eax)
    set Z flag
else {
    *location=edx
    reset Z flag
}
But on 386 you have to use xchgbl, which is usable for simple bit locks
only.
BTW: Does anyone know about similar instructions on Sparc v8, v9, MIPS,
Alpha?    

	Jakub

+---------------------------------------------------------------------------+
| Jakub Jelinek                              http://sunsite.mff.cuni.cz/~jj |
| Administrator of SunSITE Czech Republic            jj@sunsite.mff.cuni.cz |
| Na Orechovce 7, 162 00 Praha 6, Czech Republic          jj@gnu.ai.mit.edu |
| School & Office: MFF UK, Praha                      Phone: +42 2 24914213 |
+---------------------------------------------------------------------------+

Mime
View raw message