#include #include "Thread.h" #include "NitX.h" #include "NitY.h" #include "Semaphore.h" #include "sleep.h" int main(){ cout << "Start..." << endl; Semaphore* s1 = new Semaphore(0); Semaphore* s2 = new Semaphore(0); int x,y,z; Thread* p = new NitX(s1, s2, &x, &y, &z); Thread* p1 = new NitY(s1, s2, &x, &y, &z); p->start(); p1->start(); Thread::dispose(p); Thread::dispose(p1); cout << "... end." << endl; pthread_exit(0); //return 0; }