X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=course%2Fsemester2%2Fpprog%2Fassignment1%2Fmthread%2Fnbody.h;fp=course%2Fsemester2%2Fpprog%2Fassignment1%2Fmthread%2Fnbody.h;h=f2eec0dba9985ec5e65b4db30f3d548f296790a7;hb=83cf58f62ddc5ce9fe44de27327fde27f767ebb6;hp=0b3208a98ec9e1fa4ef93ac87552652bc7d95c76;hpb=19e590cc4f7dbc186cad9418bf5a2321bfa3fe1a;p=matches%2Fhonours.git diff --git a/course/semester2/pprog/assignment1/mthread/nbody.h b/course/semester2/pprog/assignment1/mthread/nbody.h index 0b3208a9..f2eec0db 100644 --- a/course/semester2/pprog/assignment1/mthread/nbody.h +++ b/course/semester2/pprog/assignment1/mthread/nbody.h @@ -16,6 +16,11 @@ void Simulation_Run(int argc, char ** argv); #undef QuitProgram void QuitProgram(bool error); +#undef BeforeDraw +void BeforeDraw(); +#undef AfterDraw +void AfterDraw(); + void * Compute_Thread(void * system); //Thread - Continuously perform computations for a System of bodies. May spawn additional worker threads. @@ -35,4 +40,8 @@ extern pthread_mutex_t mutex_workers; extern pthread_cond_t workers_done_cv; extern unsigned workers_busy; +extern pthread_mutex_t mutex_graphics; // Mutex for graphics +extern pthread_cond_t graphics_cv; //Condition used to start graphics or computation thread from the other +extern bool graphics_busy; + #endif //_NBODY_MTHREAD_H