Software implementation of test-and-set Test-and-set
the code shows testandset 2 operations: atomic read-modify-write , test. read-modify-write needs atomic. (this true because delaying value comparison amount of time not change result of test, once value test has been obtained. once code writes initial value, result of test has been determined, if has not been computed yet—e.g. in c language example, == operator.)
Comments
Post a Comment