If there is another thread holding a lock that the main thread wants to
take while pretending to be the IO thread, we will wait forever as we do
not move SITL time forward while pretending to be the IO thread.
This patch simply allows time to move forward if we've failed to take a
semaphore immediately and need to wait.