Don't understand definition of sleep_cpu

Hi there,

just out of curiosity:

sleep_cpu is defined in sleep.h like this

#define sleep_cpu()                              \
do {                                             \
  __asm__ __volatile__ ( "sleep" "\n\t" :: );    \
} while(0)

Why is it wrapped in a seemingly useless loop?

Most likely, the construct is needed to get around some quirk of the C/C++ preprocessor and compiler. It works, so why worry about it?

http://bytes.com/topic/c/answers/219859-do-while-0-macro-substitutions

Google should be your friend