What purpose does while(1); serve ? I am aware while(1) (no semicolon) loops infinitely and is similar to a spinlock situation. However I do not
while(1);
while(1)
Since the condition is always true, we can say that we are using a logic tautology as known in mathematics. While the loop proofs to be always true it won´t stop looping unless forced by the code or until resources have collapsed.