Commit Graph

3 Commits

Author SHA1 Message Date
Sai Ke WANG
d0a27baa7d sunos: fix cmpxchgi and cmpxchgl type error
atomic_cas_ptr() is for compare-and-swap pointer addresses.
So when building 64 bit:

1. `ptr` is used casted to a pointer value (4-byte into 8-byte).
2. atomic_cas_ptr reads 8-byte at `ptr` and returns

In the case of `uv_async_send`, if handle->pending is 0, cmpxchgi()
actually returns the value of the 4-bytes past handle->pending,
causing uv__async_send to never be called.

The modified test-async-null-cb.c hangs at uv_run in this case.

PR-URL: https://github.com/libuv/libuv/pull/1361
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-07-01 00:24:42 +02:00
Saúl Ibarra Corretgé
db2a9072bc unix, windows: removed unused status parameter
async, timer, prepare, idle and check handles don't need the status
parameter.
2014-03-17 21:42:36 +01:00
Ben Noordhuis
1510ce81fd unix, windows: allow NULL async callback
Allow a NULL callback so the user doesn't have to provide a dummy when
the actual event is processed by e.g. a check handle callback.
2013-08-12 08:55:51 +02:00