<div dir="auto"><div dir="ltr">Hi and thanks for the answers, <div><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This feature seems to be a compiler intrinsic at least in the Intel C<br>
compiler. We don't have anything similar, so you have to fall back either<br>
to an asm procedure or a line of inline assembler. The compiler is also<br>
not doing an optimization similar to this. Free Pascal's inline assembler<br>
supports the PAUSE instruction though.<br>
<br></blockquote><div><br></div><div>good to know that. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But unless you plan to use this in a multithreaded spinloop because you're<br>
loading multiple cores of the CPU, it's better to let the operating system<br>
handle the wait. This instruction is certainly not the way to fix a "my<br>
app uses 100% CPU" scenario, just saying.<br>
<span class="m_-1851279647116068902HOEnZb"><font color="#888888"><br>
Charlie</font></span></blockquote><div><br></div><div>I am currently investigating the use of this instruction in my kernel. I have wait-loops when accessing shared resources in a multicore system so that could be a place to use it.</div><div>Also, I have situations in which the core just spends time in a loop so this instruction may help to reduce energy consumption. All this work is however very experimental. </div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Matias </div></div></div></div></div></div>