| 419 | }; |
| 420 | |
| 421 | static bool WaitForAtomicValue(int32_atomic_t* value, int32_t expected, uint64_t timeout) |
| 422 | { |
| 423 | uint64_t stop_time = dmTime::GetMonotonicTime() + timeout; |
| 424 | while (dmTime::GetMonotonicTime() < stop_time) |
| 425 | { |
| 426 | if (dmAtomicGet32(value) == expected) |
| 427 | return true; |
| 428 | dmTime::Sleep(1000); |
| 429 | } |
| 430 | return dmAtomicGet32(value) == expected; |
| 431 | } |
| 432 | |
| 433 | static int32_t ProcessFinishedBeforeUpdate(HJobContext ctx, HJob job, void* user_context, void* user_data) |
| 434 | { |
no test coverage detected