+/EE360P
distributed systems
git clone https://git.julia.blue/+/EE360P
df69975
master
1class HWMutex implements Lock { 2TestAndSet lockFlag ; 3public void requestCS (int i ) {// entry protocol 4while (lockFlag .testAndSet (1 ) ==1 ) ; 5 } 6public void releaseCS (int i ) {// exit protocol 7lockFlag .testAndSet (0 ); 8 } 9}