OOStuBS - Technische Informatik II (TI-II)  2.4
interruptLock.cc
gehe zur Dokumentation dieser Datei
2 
3 #include "object/log.h"
4 #include "object/cpu.h"
5 
7  interruptState=true;
8  state=true;
9 }
10 
12  state=false;
13 }
14 
17  if(state)
18  log << "Lock(" << this << "): double lock" << endl;
19  state=true;
20 }
21 
23  if(!state)
24  log << "Lock(" << this << "): double unlock" << endl;
25  state=false;
26  if(interruptState)
27  cpu.enable_int();
28 }
29 
31  if(state)
32  unlock();
33 }