<div dir="ltr">Hi <br><div><br>I notice that there is a pair ppc instructions lwarx and stwcx used to atomtic operation for instance, atomic_inc/atomic_dec.<br><br></div><div>In some ppc manuals, they more emphasize its mechanism is that lwarx can reseve the target memory address preventing other CORE from modifying it.<br>
<br></div><div>I assume that there is atomtic operation executing on the CORE0 in a multicore system. In this situation, does the CORE0 disable the local HW interrupt?<br></div><div>Can the executing process from the beginning of lwarx and end of stwcx be interrupted by HW interruptions/exceptions?  Anyway, they are two assembly instructions.<br>
<br> Thanks a lot!<br></div><div><br>"1:    lwarx    %0,0,%2        # atomic_inc\n\<br>    addic    %0,%0,1\n"<br>"    stwcx.    %0,0,%2 \n\<br><br><br></div><div>BR<br></div><div>Gavin. Hu<br></div></div>