Added support for sched flag in proc.c/scheduler()