get_current_state
if (get_current_state() == TASK_RUNNING) {
unsigned int state = get_current_state();