Using testandset instruction

Provided by the processor to aid synchronization.

  1. Load content at MemoryLocation into Register
  2. Store 1 into MemoryLocation