From: klueska Date: Mon, 9 Mar 2009 18:15:49 +0000 (+0000) Subject: cahnge to cutoff for flushing at half the buffer size X-Git-Tag: rc_6_tinyos_2_1_1~467 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=f3fce2b0ee4848710afce4528e7ba2fc3c013bc7 cahnge to cutoff for flushing at half the buffer size --- diff --git a/tos/lib/printf/PrintfP.nc b/tos/lib/printf/PrintfP.nc index 0ea9b512..c1ea229b 100644 --- a/tos/lib/printf/PrintfP.nc +++ b/tos/lib/printf/PrintfP.nc @@ -167,7 +167,7 @@ implementation { #ifdef _H_atmega128hardware_H int uart_putchar(char c, FILE *stream) __attribute__((noinline)) @C() @spontaneous() { #endif - if((state == S_STARTED) && (call Queue.size() >= 5*sizeof(printf_msg_t))) { + if((state == S_STARTED) && (call Queue.size() >= ((PRINTF_BUFFER_SIZE)/2))) { state = S_FLUSHING; sendNext(); }