git.ucc.asn.au
/
matches
/
honours.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Parallel Programming - Commit before I break things
[matches/honours.git]
/
course
/
semester2
/
pprog
/
assignment1
/
mthread
/
nbody.h
diff --git
a/course/semester2/pprog/assignment1/mthread/nbody.h
b/course/semester2/pprog/assignment1/mthread/nbody.h
index
0b3208a
..
f2eec0d
100644
(file)
--- 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 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.
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_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
#endif //_NBODY_MTHREAD_H
UCC
git Repository :: git.ucc.asn.au