You copied the Doc URL to your clipboard.

__wfi intrinsic

This intrinsic inserts a WFI instruction into the instruction stream generated by the compiler.

In some architectures, for example the v6T2 architecture, the WFI instruction executes as a NOP instruction.

Syntax

void __wfi(void)

Errors

The compiler does not recognize the __wfi intrinsic when compiling for a target that does not support the WFI instruction. The compiler generates either a warning or an error in this case, depending on the source language:

  • In C code: Warning: #223-D: function "__wfi" declared implicitly.
  • In C++ code: Error: #20: identifier "__wfi" is undefined.

Related information