+/EE360P

distributed systems

git clone https://git.julia.blue/+/EE360P

Wei-Lun Hungadd chap. 2 and 3df69975

master
238 B10 linesraw
1class Attempt1 implements Lock {
2    boolean openDoor = true;
3    public void requestCS(int i) {
4        while (!openDoor) ; // busy wait
5        openDoor = false;
6    }
7    public void releaseCS(int i) {
8        openDoor = true;
9    }
10}