rtos: Rewrite rtos_try_next() for readability