5. Predavanje - VTS NS
5. Predavanje - VTS NS
5. Predavanje - VTS NS
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Implementacija semaforaclass Semaphore {public:Semaphore (int initValue=1) : val(initValue), lck(0) {}void wait ();void signal ();int value () { return val; };protected:void block ();void deblock ();private:int val;Queue blocked;int lck; // lock};64/285