I have implemented a mutex on an embedded system that have armv7 processor and a basic scheduler
There are several instructions in armv7 instruction set that are used for power efficiency.
Two of these instructions are WFE (wait for event) and WFI (wait for interrupt), the instructions enter the processor to idle mode until an event is raised or an interrupt is raised,accordingly.
Also the processor will exit idle mode if the condition that accompanied the instruction is true.
I could use one to these instructions when i failed to acquire the mutex thus the processor will be idle through the remaining of the time slice until a timer interrupt is raised and then the scheduler will context switch to another task.
If i am not concerned with power consumption is there really a reason to use these instructions instead of busy looping?