title: Purpose of while(1); statement in C
body: <p>What purpose does <code>while(1);</code> serve ?  I am aware <code>while(1)</code> (no semicolon) loops infinitely and is similar to a spinlock situation.  However I do not see where <code>while(1);</code> could be used ?</p>
  <h2>Sample code</h2>
  <pre><code>if(!condition)
  { 
    while(1);
  }
  </code></pre>
  <p>Note: This is not a case of <code>do</code>-<code>while()</code> or plain <code>while(1)</code>.</p>