Hi all,

I have tried to simply replace enter/leave_critical_section() into 
pthread_mutex if not flat build, and issued the PR.
It seems works well in uniprocessor, but there are a few remaining 
enter/leave_critical_section() calls if SMP is used.

Thanks,
Yuuichi Nakamura

> -----Original Message-----
> From: Nakamura, Yuuichi (Sony) <yuuichi.a.nakam...@sony.com>
> Sent: Monday, May 11, 2020 10:39 AM
> To: dev@nuttx.apache.org
> Cc: Nakamura, Yuuichi (Sony) <yuuichi.a.nakam...@sony.com>
> Subject: enter/leave_critical_section() calls in the user space library
> 
> Hi all,
> 
> I found a few enter/leave_critical_section() calls in libs/ directory.
> It is ok for flat build, but unavailable in the user library for 
> protected/kernel
> build. Is it correct ?
> For example, libs/libc/syslog/lib_setlogmask.c calls them.
> 
> In fact, using setlogmask() in protected build raises the build break in 
> RISC-V.
> But Arm ports succeed the build because up_irq_save/restore() are defined as
> the inline function.
> 
> Thanks,
> Yuuichi Nakamura

Reply via email to