sema_up wakes up the thread with the higest priority