Below is a sample code for the X86 arch,
# define INC(_lval,_lqual) \ __asm__ __volatile__ ( \ "lock ; incl (%0)" : /*out*/ : /*in*/"r"(&(_lval)) : "memory", "cc" )
Please help me with the equivalent MIPS32 arch.
This is similar to the gcc inline assembly for atomic increment. This is the gcc property for atomic increment:
__sync_fetch_and_add(&_lval, 1);
Works on x86, mips32, etc.
I found code that may be useful to you here . It seems to actually indicate that the built-in for gcc is not implemented for this architecture.
Source: https://habr.com/ru/post/1775794/More articles:mysql insert with highlighted - phpВключая клиентскую библиотеку Erlang от Riak в азоте - erlangКак предотвратить отображение текста ALT при наведении курсора на изображение? - cssonTouchEvent, how to get view under your finger - androidUsing Riak Erlang Client Library in Nitrogen - erlangHow to get a vertical gradient background to work in all browsers? - jquerySynchronizing a randomly deleted local SVN folder - svnPHP Doxygen collaboration schemes - phpline that calls the odfWeave-generated odt file, which is considered damaged - rSpring 3 samples - javaAll Articles