"Wait for Interrupt instruction (WFI) provides a hint to the implementation that the current hart can be stalled until an interrupt ... so a legal implementation is to simply implement WFI as a NOP" 🤔

Source: github.com/riscv/riscv-isa-man

@lupyuen Wait For Interrupt would be a conditional NOP wouldn't it? Perhaps it's fine, but it just seems wrong to use it like that. Not wrong as in it won't work but wrong as in it works and that's fine.

Follow

@AmpBenzScientist

No, the whole point of an interrupt is that it isnt a conditional NOP.

@lupyuen

@freemo @lupyuen It makes more sense when I look at an RTOS. It also makes sense why it's in the Privileged category.

A few NOPs exist in RISC-V but it's rather clever that WFI would be used instead of NOP. It should allow time sensitive operations to run as soon as they become ready.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.