1 #include "thread_controller.h"
2 #include "../opengl/runGlutMainLoop.h"
4 Thread_controller::Thread_controller()
12 pthread_mutex_init(&mutex
, 0);
16 Thread_controller::~Thread_controller()
24 void Thread_controller::run_thread(void)
28 pthread_create(&pthread1
,0,runGlutMainLoop
,(void *)this);
34 void Thread_controller::update_data(int x
,int y
,int z
,Board
* brd
)
36 pthread_mutex_lock(&mutex
);
41 selected
[0] = selected
[1] = selected
[2] = -1;
42 selected
[3] = selected
[4] = selected
[5] = -1;
43 pthread_mutex_unlock(&mutex
);
46 void Thread_controller::mutex_lock(void)
48 pthread_mutex_lock(&mutex
);
51 void Thread_controller::mutex_unlock(void)
53 pthread_mutex_unlock(&mutex
);