Commit 6d718bab authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

small fixes

parent 99513fd9
......@@ -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
......
......@@ -14,10 +14,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;
......@@ -192,7 +190,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;
}
......@@ -298,9 +295,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;
}
Supports Markdown
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