diff --git a/include/blc_command.h b/include/blc_command.h index d0da62cbbf42b683e68e3b75cb4c703bce4d62e7..84cc23d25272700ea999d73599b557faaaba5264 100644 --- a/include/blc_command.h +++ b/include/blc_command.h @@ -28,8 +28,6 @@ Few functions helping for pseudo realtime applications. #include "blc_tools.h" -#define BLC_COMMAND_LOOP_THREAD() for(blc_command_loop_init(-2); blc_command_loop_start();blc_command_loop_end()) - /** period in microseconds 0 for system as fast as possible, -1 for blocking on keyborad, -2 blocking after first iteration. @@ -128,10 +126,6 @@ void blc_command_loop_init(long loop_period); int blc_command_loop_start(); void blc_command_loop_end(); -/**Wait until the blc_loop_stop. - Return the loop_thred pointer (always NULL for now)*/ -void *blc_loop_wait_stop(); - /** Stop a textual program * - Send a quitting message with the name of the app on stderr. * - Send 'q' and flush on stdout if it is a piped output diff --git a/src/blc_loop.cpp b/src/blc_loop.cpp index 7cf82cec776e22598b4fc906ecfbbdc58eab5b97..800f9fe3baa7c8051431bba66c6dd7647501e8a2 100644 --- a/src/blc_loop.cpp +++ b/src/blc_loop.cpp @@ -12,10 +12,8 @@ struct timeval blc_loop_timer; static uint blc_period=0; static uint blc_duration=0; static uint blc_duration_min=UINT_MAX, blc_duration_max=0; - static long blc_current_duration; static int intermediate_iteration; - long blc_command_loop_period=-2; //unitialised uint64_t blc_loop_iteration_limit=UINT64_MAX; uint64_t blc_loop_iteration=0; @@ -190,7 +188,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; } @@ -294,9 +291,3 @@ void blc_command_loop_end(){ intermediate_iteration++; blc_loop_iteration++; } - -void *blc_loop_wait_stop(){ - void *result; - SYSTEM_ERROR_CHECK(pthread_join(loop_thread, &result), -1, NULL); - return result; -}