You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/04/23 12:37:07 UTC

[GitHub] [incubator-nuttx] v01d commented on issue #3599: Syslog thread-safety

v01d commented on issue #3599:
URL: https://github.com/apache/incubator-nuttx/issues/3599#issuecomment-825628425


   > @fjpanag just to be clear interrupts can not wait on a semaphore [see](https://github.com/apache/incubator-nuttx/blob/master/sched/semaphore/sem_wait.c#L78)
   
   That is the reason I think the current design is based around printing each character as it can be done without locking when using a circular buffer. But this is really inefficient for things like UART.
   
   I think the way to go would be to always use an interrupt buffer and use a work queue for logging to "slow channels". On the other hand, since logging to RAMLOG is instantaneous and already provides buffer, a semaphore could be used directly. 
   The issue about breaking on buffer boundaries maybe can be done by flushing in separate lines. If the output is indeed a very large line, it most likely should be split in various lines


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org