pthread_cond_signal(¶ms->main_cond);// ********** Do not signal if can write more !
D6(fprintf(debug_file,"_w06_: wrote data (%d , %d), buffer empty, signal main thread @ %06d\n",params->chunk_page_prep,params->chunk_page_write,get_fpga_usec(state->fd_fparmsall[0],0)));
}else{
D6(fprintf(debug_file,"_w06a_: wrote data (%d , %d), has more to write, do not signal! @ %06d\n",params->chunk_page_prep,params->chunk_page_write,get_fpga_usec(state->fd_fparmsall[0],0)));
}
pthread_mutex_unlock(¶ms->writer_mutex);// do not release untill waiting for writev() or waiting for data to write