is it allowed call "sleep" in critical section protected by "enter_critical_section" and "leave_critical_section" in SMP mode/?

30 views
Skip to first unread message

tugouxp tugouxp

unread,
Dec 26, 2019, 1:14:28 AM12/26/19
to NuttX
is it allowed call "sleep" in critical section protected by "enter_critical_section" and "leave_critical_section" in SMP mode/?
i have a try, it seems this work in smp mode, is this safe?

thank you!

spudaneco

unread,
Dec 26, 2019, 7:10:26 AM12/26/19
to nu...@googlegroups.com
Yes, it is safe.  The citcal section willbe released atomicly while sleeping and restored upon awakening



Sent from Samsung tablet.

Reply all
Reply to author
Forward
0 new messages