Skip to content
Snippets Groups Projects
Commit cc56a6e2 authored by Ezekiel Dohmen's avatar Ezekiel Dohmen
Browse files

Fixing if so MAX _TO_READ means somthing

parent 0fa30c70
No related branches found
No related tags found
3 merge requests!439RCG 5.0 release fro deb 10,!387Merge master branch into debian packaging branch,!382Adding logger module to advligorts
This commit is part of merge request !384. Comments created here will be created in the context of that merge request.
...@@ -160,7 +160,7 @@ int printer_thread_fn( void * pv ) ...@@ -160,7 +160,7 @@ int printer_thread_fn( void * pv )
{ {
//If num filled is ready but ready_for_print is not, we are waiting for //If num filled is ready but ready_for_print is not, we are waiting for
//the vsnprintf to complete //the vsnprintf to complete, which will be fast
if(ready_for_print[next_to_print] == 0) if(ready_for_print[next_to_print] == 0)
{ {
schedule(); schedule();
...@@ -181,9 +181,12 @@ int printer_thread_fn( void * pv ) ...@@ -181,9 +181,12 @@ int printer_thread_fn( void * pv )
} }
num_read = 0; num_read = 0;
//If there are no mesages ready for printing, we can give up the CPU // If there are no mesages ready for printing, we can give up the CPU
// for a while
if( atomic_read(&g_num_filled) == 0) if( atomic_read(&g_num_filled) == 0)
usleep_range(499, 1000); usleep_range(1000, 2500);
else //We have more messages
schedule();
} }
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment