added an assert to make sure that sched_getcpu returns something in the range of 0 to NUM_PROCESSORS-1