[riot-notifications] [RIOT-OS/RIOT] fe310: Fix potential deadlock in thread_yield_higher (#15277)

nmeum notifications at github.com
Fri Jan 8 08:57:07 CET 2021

I don't think this is actually that easy to reason about. For one thing, what makes you certain that an external interrupt is never raised between the store and the wfi? An external interrupt should also take precedence over a software interrupt if the wfi is reached and the former is also raised at this point.

Regardless of whether this is classified as "bug" or not: I would personally be interested in getting this fixed as it prevents execution of vanilla RIOT on any HiFive1 simulator which doesn't have a cycle-accurate timing model.

If this is just about "saving ticks": You can also rewrite the RISC-V context switch implementation to use a synchronous ECALL instead of an asynchronous software interrupt thereby eliminating the need for the busy-wait. This is the technique employed by zephyr for context switching on RISC-V. I don't really see the point in optimizing the code executed before the busy wait as you suggested before.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210107/60cef790/attachment.htm>

More information about the notifications mailing list