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


   I'm looking at RAMLOG and I would do the following modifications:
   
   1. remove CONFIG_RAMLOG_NONBLOCKING option and use O_NONBLOCK received 
during open() to determine blocking/non-blocking mode
   2. make the read() non-destroying (just allow to read ramlog contents 
without clearing it)
   3. use can control manual clearing by opening file with O_TRUNC option and 
close it
   4. make ramlog_read() do buffer copy instead of char-by-char loop. Any 
reason this is done this way? I think char-by-char write could make sense given 
that it can be called from interrupt handler (is that why?). But at least 
read() should not have that problem.
   
   I further think that supporting no buffer overwrite does not really make 
sense: if one wants to ensure messages are not lost either the buffer should be 
made bigger or a non-volatile support be used. 
   
   What do you think about these modifications?


-- 
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:
[email protected]


Reply via email to