Ben Noordhuis
58a272e556
unix: rework pending handle/req logic
2012-05-30 00:08:22 +02:00
Ben Noordhuis
12ee388cd9
test: clean up test-loop-handles.c
2012-05-29 17:35:30 +02:00
Ben Noordhuis
ec0c7b8958
test: fix double close in test-loop-handles.c
2012-05-29 17:35:30 +02:00
Bert Belder
7556590707
win/process.c: stdio fd should default to ignore
2012-05-29 00:53:04 +02:00
Ben Noordhuis
18e622d43e
unix: fix indentation in sunos.c
2012-05-29 00:09:47 +02:00
Bert Belder
81aff93633
win/process.c: remove unused function duplicate_std_handle
2012-05-29 00:06:11 +02:00
Ben Noordhuis
4690204682
unix: fix getaddrinfo bad pointer deref
2012-05-29 00:06:11 +02:00
Fedor Indutny
c0081f0e66
unix: allow specifying FDs to be inherited by a child process
...
Previously the only option was to create a pipe or an ipc channel. This
patch makes it possible to inherit a handle that is already open in the
parent process. It also makes it possible to set more than just stdin,
stdout and stderr.
2012-05-29 00:05:12 +02:00
Igor Zinkovsky
5a34f19970
windows: allow specifying FDs to be inherited by a child process
...
Previously the only option was to create a pipe or an ipc channel. This
patch makes it possible to inherit a handle that is already open in the
parent process. There is also room for setting more than just stdin,
stdout and stderr, although this is not supported yet.
2012-05-28 23:59:58 +02:00
Bert Belder
e4f23aacec
Get rid of UV_LEAN_AND_MEAN
2012-05-28 01:53:22 +02:00
Ben Noordhuis
2ec09862e4
unix, windows: set active flag on unref'd handles
...
A logic bug in uv__handle_start() and uv__handle_stop() stopped the active flag
from getting set (or unset) on unref'd handles.
2012-05-28 00:24:39 +02:00
Ben Noordhuis
028fef84b8
unix: update timer if already active
...
uv_timer_start() no longer returns an error when the timer is already active,
now it just updates the timer. Consistent with the uv-win implementation.
Fixes #425 .
2012-05-26 02:09:59 +02:00
Ben Noordhuis
ae9d4c2aab
test: add 'is active?' checks to test-timer.c
2012-05-26 01:57:49 +02:00
Ben Noordhuis
34445d0741
test: remove stale UNIX socket before running test
...
Fixes spurious test and benchmark failures.
2012-05-26 01:42:40 +02:00
Ben Noordhuis
28766dcf55
test: remove test-eio-overflow.c
...
Unreliable, it's timing / system load sensitive.
2012-05-25 01:33:44 +02:00
Ben Noordhuis
ce28e13038
unix: remove unused __attribute__((unused))
2012-05-25 01:24:17 +02:00
isaacs
604802ad47
Fix sunos build: undeclared variable 'handle'
2012-05-24 23:00:31 +02:00
Ben Noordhuis
793a52f5df
unix: pack uv structs more
...
Try to avoid alignment holes on x86_64. Shaves off 4-8 bytes from most structs.
2012-05-24 16:04:01 +02:00
Ben Noordhuis
752ac30ec8
unix: don't pass sockaddr to accept()
...
Shaves a few nanoseconds off the accept() syscall.
2012-05-24 14:31:53 +02:00
Ben Noordhuis
cff2221fbf
unix: split up loop.c
...
Move prepare/check/idle watcher code to loop-watcher.c so it can be reused for
the linux backend.
2012-05-23 23:47:06 +02:00
Ben Noordhuis
890d443558
unix: shave about 100 bytes off uv_udp_send_t
2012-05-23 23:21:08 +02:00
Ben Noordhuis
e71495c84a
unix: turn field stream->blocking into a flag
...
Saves 4 bytes.
2012-05-23 22:48:57 +02:00
Ben Noordhuis
5fd2c406f1
unix: fix up asserts in core.c and stream.c
2012-05-23 22:19:12 +02:00
Ben Noordhuis
b69f8efee1
test: remove stale socket in ipc_send_recv_pipe
...
Fixes spurious test failures.
2012-05-23 21:18:40 +02:00
Ben Noordhuis
2609e43632
unix: remove unnecessary functions in udp.c
2012-05-23 21:18:40 +02:00
Ben Noordhuis
2b09cc2246
unix: fix up asserts in udp.c
2012-05-23 21:08:40 +02:00
Ben Noordhuis
cd2a9b4d59
bench: measure ticks per second of idle event loop
2012-05-23 21:05:43 +02:00
Ben Noordhuis
7c8313bd0f
unix, windows: make uv_run_once() return a bool
...
The return value of uv_run_once() now signals if it needs to be called again.
Fixes #427 .
2012-05-23 20:49:03 +02:00
Ben Noordhuis
3604b8ddd3
unix: don't unlink UNIX socket on EADDRINUSE
...
It was a bad idea to start with...
2012-05-23 14:06:32 +02:00
Ben Noordhuis
2e3e658be1
unix: fix uv_poll CPU usage spike
...
Saúl Ibarra Corretgé reports that calling uv_poll_start() repeatedly results
in CPU usage spikes. Fixed by stopping the poll I/O watcher before updating it.
Fixes #424 .
2012-05-23 12:52:44 +02:00
Ben Noordhuis
b19a713cfc
test: fix unused variable warning
2012-05-23 12:51:15 +02:00
Ben Noordhuis
5b9c45120a
unix: fold uv__io_cb into ev_io struct
...
Makes the uv__io code a little more obscure but has the advantage that
sizeof(uv__io_t) == sizeof(ev_io), i.e. the sizes of embedding handles
don't change.
2012-05-23 03:57:08 +02:00
Ben Noordhuis
3bc9707054
unix: replace ev_io with uv__io_t
...
Replace ev_io usage with wrapper constructs.
This is preliminary work for the transition to a libev-less linux backend.
2012-05-23 03:42:32 +02:00
Ben Noordhuis
7a64ec49ff
test: clean up test-tcp-writealot.c
...
Avoid unnecessary heap allocations, makes it easier to reason about correctness.
2012-05-23 01:50:10 +02:00
Igor Zinkovsky
2df831723f
windows: set flags for uv_fs_symlink
2012-05-22 16:32:17 -07:00
Igor Zinkovsky
253d718572
report correct error
2012-05-22 15:58:01 -07:00
Bert Belder
0ef7844b87
Disable test-callback-order
...
It's not correct.
2012-05-22 17:13:04 +02:00
Bert Belder
d1665792ca
Get rid of UV_HANDLE_TYPE_PRIVATE
2012-05-22 16:11:24 +02:00
Bert Belder
58ba2d86e1
Move shared c-ares glue code from uv-common to cares.c
2012-05-22 16:11:23 +02:00
Bert Belder
c06edd4c88
windows, unix: share c-ares glue code
2012-05-22 16:11:22 +02:00
Bert Belder
25316a3f92
Make the gethostbyname benchmark more precise
2012-05-22 16:11:21 +02:00
Ben Noordhuis
a478847f74
test: add callback order test
...
Ensure that idle callbacks run before other callbacks.
2012-05-22 16:04:11 +02:00
Ben Noordhuis
80b554129b
unix: reactive new idle watcher implementation
...
The new idle watcher was temporarily disabled in 073a48d due to some semantic
incompatibilities with the previous implementation. This commit resolves those
issues and reactivates the new implementation.
One outstanding bug is that idle watchers can run in a different order
(relative to other handle types) than the old implementation, e.g. (timer, idle)
instead of the expected (idle, timer). This will be fixed in an upcoming commit.
2012-05-22 15:13:52 +02:00
Ben Noordhuis
6190caba05
unix: remove outdated comment
2012-05-22 15:08:29 +02:00
Igor Zinkovsky
ea8fa31fc0
fix fs_symlink_dir test
2012-05-22 00:23:26 -07:00
Bert Belder
ad279df7c0
Unix: remove superfluous variable from uv_poll_start
2012-05-22 01:03:47 +02:00
Ben Noordhuis
6fd9bfb7b0
unix: fix event loop block, prepare/check invoke
...
Don't block in epoll_wait() / kevent() / etc. syscall unless there are active
handles. If there are only active requests, do a non-blocking poll.
Likewise, don't run the prepare and check watchers unless there are active
handles *or* requests.
2012-05-21 17:41:52 +02:00
Frank Denis
d27a62deff
unix: fix build on dragonfly bsd
...
Unbreak compilation on Dragonfly BSD, that uses kqueue, too.
2012-05-21 15:44:20 +02:00
Ben Noordhuis
e82d46452e
unix: fix close-before-connect bug
...
Closing the TCP socket before the SYN/ACK handshake completed hung the event
loop, the connect req didn't get unregistered.
2012-05-18 01:19:57 +02:00
Ben Noordhuis
e10a87adb9
unix: streamline shutdown req cleanup logic
2012-05-18 01:19:57 +02:00