Support of cmpxchg
I am trying to get some DRM ( direct rendering module ? ) code to work with XFree86 on a mips system and have come across the function cmpxchg(). On x86 systems 486 and higher this is an assembly instruction. Other architectures like sparc have some inline assembly to preform the same task. Yet other architectures like the parisc have generic c code to implement the function. MIPS it seems has nothing.
Has anyone ever implemented this for mips2 and higher architecture ?
If no, does anyone think it is possible to use ll / sc to implement this function similar to the spinlock case. Or should I just stick with the generic c versions ?
Any thoughts / code / comments welcome
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Quoted 9 lines · Wayne Gowcher
I am trying to get some DRM ( direct rendering module ? ) code to work with XFree86 on a mips system and have come across the function
cmpxchg(). On x86 systems 486 and higher this is an assembly instruction. Other architectures like sparc have some inline assembly to preform the same task. Yet other architectures like the parisc have generic c code to implement the function. MIPS it seems has nothing.
Quoted 7 lines
Has anyone ever implemented this for mips2 and higher architecture ?
If no, does anyone think it is possible to use ll / sc to implement this function similar to the spinlock case. Or should I just stick with the generic c versions ?
Doing it with ll/sc should be straightforward.
Signature · 3 lines
+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +