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?

Google should be your friend