The function update_running_head(...) updates the pointer pointing to the highest priority runnable thread.
The implementation updates RUNN_HEAD pointer to the new running thread, if the new running thread has the same or higher priority then current RUNN_HEAD.
If a thread with the same priority as a running thread becomes running, then RUNN_HEAD is updated to this thread. Then if this second thread gets blocked, then the previous thread will never be scheduled, as the RUNN_HEAD pointer is past it, and the search always starts at RUNN_HEAD.