drop the use of the Linux code.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120>
while (p_atomic_read(&queue->count))
os_time_sleep(100);
else {
- struct timespec t, current;
- clock_gettime(CLOCK_MONOTONIC, ¤t);
- timespec_add_nsec(&t, ¤t, timeout);
- bool timedout = false;
- while (p_atomic_read(&queue->count) && !(timedout = timespec_passed(CLOCK_MONOTONIC, &t)))
- os_time_sleep(10);
- if (timedout)
+ int64_t atime = os_time_get_absolute_timeout(timeout);
+ if (!os_wait_until_zero_abs_timeout(&queue->count, atime))
return VK_TIMEOUT;
}
return VK_SUCCESS;
mtx_t m;
cnd_t new_work;
struct list_head workqueue;
- uint32_t count;
+ volatile int count;
};
struct lvp_queue_work {