dinput/tests: Wait for the expected report to actually be pending.
There is a race otherwise where we try to complete a pending IRP but
because the async is writing the report from another thread we didn't
find it and instead ignored it.
Instead we need to atomically check if there was a pending IRP, and if
the queue is empty, or queue the wait.
Later, when a report is going to be marked as pending, and if there's
someone waiting for it already, we instead complete it immediately.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Showing
Please
register
or
sign in
to comment