Hardware support (contd.)
Function for Test and Set instruction:
bool testSet (bool & i)
{
//test
if ( i == 0) { // set
i = 1; return 1;}
else return 0;
}
// 0 - FALSE
// 1 - TRUE
Previous slide
Next slide
Back to first slide
View graphic version