Commit 4237373d authored by Ben Noordhuis's avatar Ben Noordhuis Committed by Rod Vagg
Browse files

crypto: replace rwlocks with simple mutexes

It was pointed out by Zhou Ran that the Windows XP implementation of
uv_rwlock_rdlock() and friends may unlock the inner write mutex on a
different thread than the one that locked it, resulting in undefined
behavior.

The only place that uses rwlocks is the crypto module.  Make that use
normal (simple) mutexes instead.

OpenSSL's critical sections are generally very short, with exclusive
access outnumbering shared access by a factor of three or more, so
it's not as if using rwlocks gives a decisive performance advantage.

PR-URL: https://github.com/nodejs/node/pull/2723


Reviewed-By: default avatarFedor Indutny <fedor@indutny.com>
parent 28c2d310
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment