-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: backport 9a4fd268 from libuv upstream
Original commit message: win: redo/fix the uv_rwlock APIs Previously, on Windows Vista and later, we'd use the Windows native SRWLock APIs. However they turned out to be semantically incompatible with pthread read-write locks and/or plain buggy. This patch makes sure that the custom implementation that was previously only used on old Windows versions is now used everywhere. This patch fixes a number of issues with the old fallback implementation. Specifically: * The reader count would not be incremented when a thread successfully acquired a read lock while another thread *also* held a read lock. * `uv_rwlock_tryrdlock()` and `uv_rwlock_trywrlock()` now consistently return UV_EBUSY when a lock couldn't be acquired. * Any unexpected errors now cause libuv to abort, with the exception of `uv_rwlock_init()`. See also libuv/libuv#515. PR-URL: libuv/libuv#525 Reviewed-By: Saúl Ibarra Corretgé <[email protected]> PR-URL: nodejs-private/node-private#54 Reviewed-By: Saúl Ibarra Corretgé <[email protected]>
- Loading branch information
Showing
2 changed files
with
87 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters