Consider a machine instruction, TSB, which performs the following function as a single indivisible operation:
TSB(X, L) {if(X == 0) goto L else X = 0; }
That is, TSB tests the variable X. Depending on the outcome of the test, the instruction either branches to an address L, or it sets X to zero, and execution continues with the next instruction following TSB. Implement the P b and V b operations on binary semaphores using TSB.