Commit Graph

1537 Commits

Author SHA1 Message Date
Bert Belder
0dff0e7d47 test: avoid compiler warnings due to size_t truncation 2012-06-04 18:04:49 +02:00
Bert Belder
64f8cf463d windows, unix: uv_buf_init should take unsigned int for the buffer length 2012-06-04 18:04:49 +02:00
Bert Belder
c0b530d079 Windows: avoid compiler warning 2012-06-04 18:04:48 +02:00
Bert Belder
60746b03cb windows: move some stream functions to stream-inl.h 2012-06-04 18:04:47 +02:00
Bert Belder
754a695df6 windows: move request macros to req-inl.h 2012-06-04 18:04:46 +02:00
Bert Belder
63b9b1d472 windows: move handle macros to handle-inl.h 2012-06-04 18:04:45 +02:00
Bert Belder
1974541bc9 windows: guard against including req-inl.h more than once 2012-06-04 18:04:45 +02:00
Bert Belder
3b907cf0ec windows: guard against including handle-inl.h more than once 2012-06-04 18:04:44 +02:00
Ben Noordhuis
d08070435d test: rename test tcp_dont_connect_after_write
Rename test tcp_dont_connect_after_write to tcp_connect_error_after_write,
teensy tad more descriptive.
2012-06-04 17:35:56 +02:00
Ben Noordhuis
76fa163117 test: add a 'write before connect' test 2012-06-04 17:12:20 +02:00
Ben Noordhuis
cb9ca142b5 unix: queue write reqs if stream is not connected 2012-06-04 16:55:04 +02:00
Fedor Indutny
a30e45f1d7 unix: remap fds 0-2 to /dev/null if ignore flag set 2012-06-04 16:14:21 +02:00
Ben Noordhuis
97801c6315 test: disable tcp_dont_connect_after_write on windows
For now. See #444.
2012-06-04 16:07:50 +02:00
Ben Noordhuis
b96ed68f46 test: add TCP connect error + write test
Original test contributed by Iñaki Baz Castillo. See #443.
2012-06-04 15:58:32 +02:00
Ben Noordhuis
c76c2066c6 unix, windows: add semaphore functions 2012-06-03 04:04:05 +02:00
Ben Noordhuis
7d97ba8003 unix: make mutex sanity checks non-optional 2012-06-03 04:01:26 +02:00
Ben Noordhuis
c03964f840 unix: set PTHREAD_MUTEX_ERRORCHECK in debug mode 2012-06-03 03:53:05 +02:00
Ben Noordhuis
28ed730bfb test: fix implicit function declaration warnings
Fixes the two following compiler warnings:

  ../test/run-tests.c: In function ‘maybe_run_test’:
  ../test/run-tests.c:117: warning: implicit declaration of function ‘write’
  ../test/run-tests.c:118: warning: implicit declaration of function ‘fsync’
2012-06-03 01:17:24 +02:00
Bert Belder
d8b95eaffb windows: inline a couple of handle functions 2012-06-02 23:38:16 +02:00
Bert Belder
d402604118 windows: inline a couple of inline request functions 2012-06-02 23:08:22 +02:00
Bert Belder
ed30365f54 uv-common: define INLINE macro 2012-06-02 23:06:43 +02:00
Bert Belder
dd1355da8d windows: stop poll watcher when watched socket is closed locally 2012-06-02 22:36:52 +02:00
Fedor Indutny
1cd9642cbb test: stdin/out/err should be set to /dev/null when ignored 2012-06-02 21:38:39 +02:00
Bert Belder
bdb8b3a1f2 windows: always set FDs 0-2 for spawned child processes 2012-06-02 21:17:03 +02:00
Bert Belder
4a07b8b7bd test-poll: make spurious wakeup detection slightly less strict 2012-06-02 21:12:10 +02:00
Bert Belder
619686e9e9 windows: fix fall-through bug in init_child_stdio() 2012-06-02 21:05:06 +02:00
Bert Belder
d21fc6c333 windows: move uv_hrtime() to util.c
* It has nothing to do with timer handles, so it doesn't belong in
  timer.c
* uv_hrtime_init() was merged into uv__util_init()
2012-06-02 20:37:08 +02:00
Bert Belder
ec95a07d00 windows/util: move initialization code to uv__util_init 2012-06-02 20:35:14 +02:00
Bert Belder
cd1298c388 windows: retrieve function pointers before doing anything else 2012-06-02 20:20:51 +02:00
Bert Belder
1d64a36caa windows: add support for cpu times to uv_cpu_info()
* Also cleans up the code and makes it use unicode APIs consistently.
* Credits go to Brian White for creating an earlier version of this
  patch.

Closes #327
2012-06-02 20:05:12 +02:00
Brian White
4252240e54 windows: add uv__once_init() that ensures that libuv has been initialized 2012-06-02 20:05:12 +02:00
Brian White
87f3530a1e windows: retrieve NtQuerySystemInformation at startup 2012-06-02 20:05:11 +02:00
Bert Belder
120d997809 windows: fix NTSTATUS redefined when compiling with MinGW
Closes #403
Closes #422
2012-06-02 17:39:31 +02:00
Bert Belder
961e0cf8da windows/tty: never report error after forcibly aborting line-buffered read 2012-06-02 03:08:48 +02:00
Bert Belder
38a6f9f0d9 test: fix windows-ism in test-poll-close.c 2012-06-01 18:53:11 +02:00
Bert Belder
07f0175239 windows: fix hang when closing an active poll handle 2012-06-01 18:39:49 +02:00
Bert Belder
9759c20e90 test: verify that closing an active poll handle doesn't hang 2012-06-01 18:39:47 +02:00
Bert Belder
87dbffbd8f windows: fix undefined function warning in run-tests.c 2012-06-01 17:49:29 +02:00
Bert Belder
3ec9c67f93 windows: improve spawn stdio support
* Make using an existing stream for stdio actually work
* Support up to 256 stdio channels
* Fix some minor bugs
2012-06-01 17:47:20 +02:00
Fedor Indutny
dc7a62d114 test: test for uv_spawn with stdio_count == 3 2012-06-01 17:32:34 +02:00
Fedor Indutny
f5b5127db0 change spawn() api to allow using existing streams for stdio
This commit also adds support for this api on Unix.
2012-06-01 17:32:27 +02:00
Bert Belder
528123ad9a windows: fix bugs in uv__fast_poll_cancel_poll_req 2012-06-01 03:05:31 +02:00
Bert Belder
04a7e5c274 test-spawn.c: remove unused variable 2012-06-01 02:26:25 +02:00
Charlie McConnell
69a923bf93 process: implement UV_PROCESS_DETACHED flag for uv_spawn 2012-06-01 02:24:05 +02:00
Bert Belder
aecddfe530 windows: style fix 2012-05-31 17:35:25 +02:00
Bert Belder
0c727fd774 windows: don't crash 2012-05-31 17:34:53 +02:00
Ben Noordhuis
c9396dd57e unix: implement timers in libuv
* replace libev backed timers with a pure libuv implementation
* gut ev_run() and make it take a timeout instead of flags

Incidentally speeds up the loop_count_timed benchmark by about 100%.
2012-05-31 03:08:34 +02:00
Ben Noordhuis
3f37ba859f bench: add new idle loop count benchmark 2012-05-31 02:46:18 +02:00
Ben Noordhuis
71a66c17a1 unix: mark eio poll handles as internal 2012-05-30 02:33:50 +02:00
Ben Noordhuis
171ad8567d unix, windows: add uv_walk()
Lets the libuv user iterate over the open handles. Mostly intended as a
debugging tool or a post-hoc cleanup mechanism.
2012-05-30 02:33:39 +02:00