Inside include/linux/sched.h one of the important task state changing functions is:
#define __set_task_state(tsk, state_value) \
do { (tsk)->state = (state_value); } while (0)
#define set_task_state(tsk, state_value) \
set_mb((tsk)->state, (state_value))
As you can see there is a do while() structure inside #define __set_task_state(...).
Now my question is, is it just like any other C do-while loop code - or does it have special properties as it is defined inside #define macro?
Thanks