On Wed Apr 16 21:33:06 2025 +0000, Alex Henrie wrote:
If we want to be sure that `status` is saved immediately, should we make it volatile?
I guess we could, although in practice it doesn't seem necessary. The following ok() generates a couple of function calls (the first one being to `winetest_get_thread_data()`) which basically force sequencing already.
In general, the idea here is to make sure that the work related to the first `ok()` call doesn't allow the second `ok()` to succeed, which could happen if e.g. one runs the test with `WINETEST_REPORT_SUCCESS=1`, since in that case there's a syscall involved and thus an opportunity for the APC to execute. An alternative is (and my original solution was) to swap the two `ok()` calls instead.