Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto: replace rwlocks with simple mutexes #2723

Merged
merged 1 commit into from Sep 7, 2015

Commits on Sep 7, 2015

  1. 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: nodejs#2723
    Reviewed-By: Fedor Indutny <fedor@indutny.com>
    bnoordhuis committed Sep 7, 2015
    Copy the full SHA
    7ee58be View commit details
    Browse the repository at this point in the history