BACI System: C-- to PCODE Compiler in C, 11:30 1 Oct 2012 Source file: zad2.cm Mon Dec 10 11:18:38 2018 line pc 1 0 monitor s{ 2 0 condition c; 3 0 int elem; 4 0 void pushElement(int val){ 5 1 elem = val; 6 4 signalc(c); 7 6 } 8 8 int getElement(){ 9 9 waitc(c); 10 12 return elem; 11 16 } 12 18 init { elem = 0; } 13 22 } 14 22 void prod() { pushElement(10); } 15 27 void kons() { cout << getElement(); } 16 32 main(){ 17 33 cobegin { prod(); kons(); }; 18 41 }