Switch from old-style ASSERT macro to new-style ASSERT_EQ,... macros.
Using new-style macros makes it easier to debug test failures
Fixes: https://github.com/libuv/libuv/issues/2974
Trying to acquire a rwlock that the current thread already owns may fail
(not "shall fail") with EDEADLK. Libuv considers that a fatal error and
rightly so in my opinion; it normally means the program contains a logic
error.
The test had indeed logic errors. This commit splits off the UV_EBUSY
return code testing into a separate thread, eliminating the potential
for self-deadlock.
Fixes: https://github.com/libuv/libuv/issues/544
PR-URL: https://github.com/libuv/libuv/pull/649
Reviewed-By: Jeremy Whitlock <jwhitlock@apache.org>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Read/write locks are emulated with critical sections on Windows XP and Vista
because those platforms don't have a (complete) native read/write lock API.