mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-12 22:15:32 +00:00
Some functions in the time manager, for example 'TMTimerSet()' and 'TMTimerStop()' let VirtualBox abort with a failed assertion if the timer does not change to a 'stable' state after 1000 calls of a mixture of 'yield' and 'sleep'. On Genode, this happens sometimes when the 'EMT' thread is executing 'TMTimerSet()' and gets interrupted by the 'TAP' thread, which calls 'TMTimerStop()' and waits for the 'EMT' thread to finish setting the timer. Since the 'EMT' thread has the lowest priority, 1000 retries can be too few. Without the assertion, these functions would return an error code, which is often ignored by the caller, so it seems safer to keep retrying until the function can return successfully. Fixes #1437