Commit cfc9ad5e authored by Ian McInerney's avatar Ian McInerney

Moved thread init prints

parent e26def18
......@@ -313,14 +313,8 @@ int main(int argc, char **argv) {
void* status;
pthread_mutex_init(&mutex, NULL);
printf("Spawning User Input Thread\n");
pthread_create(&threads[0], NULL, UIThread, (void*)1);
printf("Spawning VRPN Thread\n");
pthread_create(&threads[1], NULL, vrpn_go, (void*)2);
printf("Spawning User Output Thread\n");
pthread_create(&threads[2], NULL, displayData, (void*)3);
pthread_join(threads[1], &status);
......
......@@ -28,6 +28,8 @@ void* UIThread(void *threadID) {
struct termios ttystate;
printf("Spawning User Input Thread\n");
//get the terminal state
tcgetattr(STDIN_FILENO, &ttystate);
......
......@@ -16,6 +16,8 @@ const string CLEAR = "\033[H\033[J";
*/
void* displayData(void* id) {
printf("Spawning User Output Thread\n");
while (1) {
// Clear the display
cout << CLEAR;
......
......@@ -89,6 +89,8 @@ void vrpn_init(std::string connectionName, void (*callbackHand)(void*, const vrp
void* vrpn_go(void *threadID) {
int i = 0; //for ending the while loop
printf("Spawning VRPN Thread\n");
while(!i) { //1 replace 'i<20000' when done testing ******
// Parse commands received from the user
parseCommand();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment