restyle the code style and add function switch_task

Signed-off-by: Le,Min <min.le@intel.com>