On 04/07/2013 23:20, Andreas Nilsson wrote: > On Sun, Apr 7, 2013 at 9:36 PM, deeptech71 <deeptech71_at_gmail.com <mailto:deeptech71_at_gmail.com>> wrote: > options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. > > And here I thought that it was added to mitigate the "interspersed output" problem, and I remember that adding to the conf on previous version help address the problem. And you were right. AFAICT, the problem was that the threads were writing single characters ("putc()ing") at a time, and would get preempted by other such threads in between. Thus, such tasks would get interleaved at character granularity. Proposals were: (a) use a stack array in printf()'s body to do line buffering; some argued that kernel stack sizes are fairly limited, others argued that this should not be a limitation even on embedded platforms; (b) allow a printf() task to fully finish before allowing other printf() tasks to start. The (a) solution was chosen, with an amendment that the array would be specifiable by a kernel configuration option. GENERIC kernels have "options PRINTF_BUFR_SIZE=128". If the original poster had removed the PRINTF_BUFR_SIZE option from his kernel configuration, then I see his complaint as invalid.Received on Mon Apr 08 2013 - 06:39:11 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:36 UTC