diff --git a/src/blc_command.cpp b/src/blc_command.cpp index 801e33ba26d88f3e83388f44b5d0e11ee7258982..636a8c9d8012067e7702d20d79359e3f4bf1cbbd 100644 --- a/src/blc_command.cpp +++ b/src/blc_command.cpp @@ -232,25 +232,6 @@ int blc_command_try_to_interpret(){ } -/// if the parameter is not null we should display the help at each command. -static void *command_thread_interpret_loop(void *){ - while(blc_status==BLC_RUN){ - blc_command_interpret(); - } - return NULL; -} - - -void blc_command_interpret_thread(char const *option, void (*ask_quit_funcion)()){ - pthread_t thread; - - if (ask_quit_funcion==NULL) ask_quit_funcion=blc_command_ask_quit; - blc_command_loop_period=-2; - if (strchr(option, 'h')) blc_command_add("h", (type_blc_command_cb)blc_command_display_help, NULL, "display this help", NULL); - if (strchr(option, 'q')) blc_command_add("q", (type_blc_command_cb)ask_quit_funcion, NULL, "quit the application", NULL); - SYSTEM_ERROR_CHECK(pthread_create(&thread, NULL, command_thread_interpret_loop, NULL), -1, NULL); -} - void blc_command_update_int_cb(char const *argument, void *int_pt){ char *endptr; int value; diff --git a/src/blc_loop.cpp b/src/blc_loop.cpp index b12d2d56031a96aa7191ab4987b9c37fee3c5346..16d4d52ce90225cf41c7ba74a1404031c424651b 100644 --- a/src/blc_loop.cpp +++ b/src/blc_loop.cpp @@ -195,7 +195,6 @@ static void *command_thread_interpret_loop(void *){ while(blc_status!=BLC_QUIT){ blc_command_interpret_block(); if (blc_command_loop_period==-1) BLC_PTHREAD_CHECK(pthread_mutex_unlock(&mutex_lock_keyboard), NULL); - //blc_command_interpret(); } return NULL; } @@ -248,7 +247,7 @@ int blc_command_loop_start(){ else if (blc_status==BLC_RUN){ //We wait for semaphore FOR(i, waiting_semaphores_nb) { - blocking_semaphore=waiting_semaphores[i]; + blocking_semaphore=waiting_semaphores[i]; //This is used to be able to unlock all blocking semaphore on quiting SYSTEM_ERROR_CHECK(sem_wait(blocking_semaphore), -1, NULL); } blocking_semaphore=NULL;