hartmannathan commented on PR #16977:
URL: https://github.com/apache/nuttx/pull/16977#issuecomment-3271963833

   I once had to work on a board that did not have a serial port, so it was 
convenient to use syslog() with a memory buffer IIRC.
   
   The difference between Linux (which has printk) and NuttX is that NuttX can 
run on all kinds of deeply embedded boards, such as the board I mentioned 
earlier, which did not have any serial ports.
   
   I agree that having a printk could be confusing. Future kernel developers 
might wonder "should I use syslog or printk here?" How would you know which one 
to pick for each situation? Will printk be available in userland programs?
   
   I think it would be best if syslog EMERG could be fixed somehow to solve the 
earlier problems and make it guaranteed synchronous to solve the use case of 
this PR.
   
   If we want to have printk for compatibility (e.g., to make it possible to 
port Linux device drivers to NuttX) maybe it can be implemented as a thin 
wrapper around syslog EMERG.
   
   Alternatively maybe syslog EMERG could be a thin wrapper around printk? 
Either way is OK with me.
   
   I don't have a strong opinion either way. I won't block this PR unless I 
find some serious problem. (I will review later to make sure the code look OK.) 
Other people are closer to this part of the code and can make a more informed 
decision than I can.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to