libuv/src/win
Bert Belder 9a4fd2689d 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 https://github.com/libuv/libuv/issues/515.

PR-URL: https://github.com/libuv/libuv/pull/525
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-09-22 11:18:13 -04:00
..
async.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
atomicops-inl.h windows: move uv_atomic_exchange_set to atomicops-inl.h 2012-08-14 01:04:43 +02:00
core.c unix, win: make uv_loop_init return on error 2015-08-20 17:39:21 +02:00
dl.c Merge branch 'v0.10' into v1.x 2014-12-14 20:36:18 +01:00
error.c win: remove unnecessary malloc.h #includes 2015-03-14 12:45:15 +01:00
fs-event.c win: add support for recursive file watching 2015-07-08 23:40:47 +02:00
fs.c unix,windows: allow NULL loop for sync fs requests 2015-08-18 15:39:21 +02:00
getaddrinfo.c core: add ability to customize memory allocator 2015-06-02 12:05:20 +02:00
getnameinfo.c win: remove unnecessary malloc.h #includes 2015-03-14 12:45:15 +01:00
handle-inl.h style: remove trailing whitespace 2014-06-24 20:18:10 +04:00
handle.c windows: improved handling of invalid FDs 2014-01-09 18:29:18 +01:00
internal.h win: add support for recursive file watching 2015-07-08 23:40:47 +02:00
loop-watcher.c windows: further simplify the code for timers 2014-09-10 09:52:00 +02:00
pipe.c win: fix setting pipe pending instances after bind 2015-08-24 23:20:35 +02:00
poll.c win: name all anonymous structs and unions 2015-03-04 09:35:10 +01:00
process-stdio.c win: remove UV_HANDLE_CONNECTED 2015-07-07 09:45:48 +02:00
process.c win: fix compilation 2015-06-03 00:22:19 +02:00
req-inl.h win: fix pipe blocking writes 2015-03-12 09:23:19 +01:00
req.c windows: inline a couple of inline request functions 2012-06-02 23:08:22 +02:00
signal.c windows: fix console signal handler refcount 2014-04-12 10:09:40 +02:00
stream-inl.h win: name all anonymous structs and unions 2015-03-04 09:35:10 +01:00
stream.c win: name all anonymous structs and unions 2015-03-04 09:35:10 +01:00
tcp.c win: set accepted TCP sockets as non-inheritable 2015-08-18 15:14:50 +02:00
thread.c win: redo/fix the uv_rwlock APIs 2015-09-22 11:18:13 -04:00
timer.c windows: improve timer precision 2014-09-17 23:17:41 +02:00
tty.c win, tty: do not convert \r to \r\n 2015-08-31 10:07:40 +02:00
udp.c unix, win: add ability to create tcp/udp sockets early 2015-06-19 09:37:19 +02:00
util.c win: fix compilation warning on MinGW 2015-06-03 21:13:03 +02:00
winapi.c win: make available NtQueryDirectoryFile 2015-01-05 01:38:27 +01:00
winapi.h win: add definitions for MUI errors mingw lacks 2015-01-05 17:15:00 +01:00
winsock.c Merge branch 'v0.10' into v1.x 2014-12-10 16:58:01 +01:00
winsock.h win: add missing IP_ADAPTER_UNICAST_ADDRESS_LH definition for MinGW 2014-11-06 19:20:32 -05:00