I think enter/leave_critical_section() call should be replaced with
semaphore/mutex/spinlock/atomic_ in most case, not only more standard but
also more fast in SMP. Especially, multiple core MCU/DSP design extend from
desktop to mobile and embedded now.

-----Original Message-----
From: Nakamura, Yuuichi (Sony) <yuuichi.a.nakam...@sony.com> 
Sent: Monday, May 11, 2020 9: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