fix priority comparison in sched_switch

fixes an old, but yet unknown bug in the mutex implementation