Previous | Next --- Slide 18 of 66
Back to Lecture Thumbnails
endofmoore

In the x86 version of test-and-set EAX is the return value of the function hence if the lock is not acquired (i.e. dst!=EAX) we expect a return value of dst . If the value in EAX is equal to dst then the src is loaded into dst, and EAX will hold it's old value; the return value in EAX will be it's old value - an indicator that the lock has been acquired.

endofmoore

^ *an indicator that the exchange was successful

Please log in to leave a comment.