move loop invariants in schedcpu; try to make curpri reflect