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 2022/10/11 07:29:14 UTC

[GitHub] [incubator-nuttx] XinStellaris commented on pull request #6512: driver/syslog:sched lock in syslog to prevent garbled print from multi-thread

XinStellaris commented on PR #6512:
URL: https://github.com/apache/incubator-nuttx/pull/6512#issuecomment-1274214376

   after all the discussion, i think maybe its better to change how the application code uses syslog, by splitting long string into several lines and limiting the line size less than iob buffer size.
   
   
   
   ---Original---
   From: "Xiang ***@***.***&gt;
   Date: Sun, Jun 26, 2022 00:39 AM
   To: ***@***.***&gt;;
   Cc: ***@***.******@***.***&gt;;
   Subject: Re: [apache/incubator-nuttx] driver/syslog:sched lock in syslog toprevent garbled print from multi-thread (PR #6512)
   
   
   
   
    
   @xiaoxiang781216 commented on this pull request.
    
    
   In drivers/syslog/vsyslog.c:
    &gt; @@ -79,6 +79,10 @@ int nx_vsyslog(int priority, FAR const IPTR char *fmt, FAR va_list *ap)  #endif  #endif   +#ifdef CONFIG_SYSLOG_SCHEDLOCK +  sched_lock();  
   sched_lock can't protect in SMP case, so you have to use critical section here.
    
   —
   Reply to this email directly, view it on GitHub, or unsubscribe.
   You are receiving this because you were mentioned.Message ID: ***@***.***&gt;


-- 
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: commits-unsubscribe@nuttx.apache.org

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