Commit Graph

1148 Commits

Author SHA1 Message Date
Ben Noordhuis
9db39bb7bd unix: don't use C99 comments in C89 source 2011-09-28 00:57:19 +02:00
Ben Noordhuis
1cca230d76 Merge remote-tracking branch 'origin/v0.6' 2012-01-23 13:27:47 +01:00
Igor Zinkovsky
edbabe6f83 windows: set error using WSAGetLastError 2012-01-22 18:00:07 -08:00
Igor Zinkovsky
726e36cf7c implement uv_udp_set_multicast_ttl and uv_udp_set_broadcast on windows 2012-01-22 17:52:20 -08:00
Dan VerWeire
497b1ecd00 unix: add uv_udp_set_broadcast() and uv_udp_set_multicast_ttl() 2012-01-21 03:06:47 +01:00
Dan VerWeire
b674187c38 unix: set SO_REUSEADDR before binding 2012-01-21 03:06:43 +01:00
Ben Noordhuis
517bfc8902 Merge branch 'v0.6' 2012-01-19 16:22:21 +01:00
Ben Noordhuis
32b291d5be build: don't set -mmacosx-version-min
It sets __MAC_OS_X_VERSION_MIN_REQUIRED__, which is what we use for feature
detection.
2012-01-19 16:20:44 +01:00
Ben Noordhuis
646c80bb41 build: generate Makefiles on OS X 2012-01-19 15:01:23 +01:00
Ben Noordhuis
98f3446c43 unix: don't close kqueue fd in kqueue_fork()
The file descriptor is not inherited by the child process. Trying to close it is
not just useless, it's actively harmful - if the close() call succeeds, it will
have closed an altogether different file descriptor.
2012-01-19 14:48:41 +01:00
Ben Noordhuis
454e0212b0 unix: clean up udp read/write watchers 2012-01-18 20:19:59 +01:00
Ben Noordhuis
28b0867f03 unix: clean up udp shutdown sequence 2012-01-18 20:18:57 +01:00
Ben Noordhuis
ee10cb77bd unix: use container_of() instead of w->data 2012-01-18 19:34:22 +01:00
Ben Noordhuis
dd7e6f0163 test: don't use malloc/free in test-timer 2012-01-18 19:00:55 +01:00
Ben Noordhuis
6ede034a7e test: #include missing <string.h> 2012-01-18 15:56:43 +01:00
Ben Noordhuis
1161d31aea test: move container_of() macro into task.h 2012-01-18 15:56:40 +01:00
Ben Noordhuis
fbbc085448 Rename COUNTOF() to ARRAY_SIZE().
Consistent with Node, it has an ARRAY_SIZE() macro but not COUNTOF().
2012-01-18 15:48:31 +01:00
Ben Noordhuis
dee86dd5b0 unix: don't retry close() on EINTR
Linux 2.6 always closes the file descriptor, even on EINTR. Retrying the close()
call isn't merely useless, it's actively harmful - the file descriptor may have
been acquired by another thread.
2012-01-18 15:06:30 +01:00
Ben Noordhuis
bf8ccfce18 unix: fix segfault in uv_guess_handle()
Fixes #293.
2012-01-17 17:47:33 +01:00
Igor Zinkovsky
52511b9ddc windows: implement uv_loop_new+uv_loop_delete 2012-01-16 17:07:49 -08:00
Igor Zinkovsky
f5bd21f181 conform to ANSI C 2012-01-16 13:52:45 -08:00
Ben Noordhuis
71f6c0edb8 Merge remote-tracking branch 'origin/v0.6'
Conflicts:
	src/win/util.c
2012-01-16 18:07:49 +01:00
Fedor Indutny
e7758e126f unix: remove eio_set_max_poll_reqs
* added test
2012-01-16 14:49:13 +01:00
Igor Zinkovsky
26512731e3 remove uv_thread_self 2012-01-13 17:24:30 -08:00
Ben Noordhuis
0e6e4abedc unix: fix udp recv_start refcount
Calling uv_udp_recv_start() should not bump the event loop's reference count.

Fixes failing test udp_ref2.
2012-01-14 01:44:27 +01:00
Ben Noordhuis
6d9c9a533f Add uv_loop_refcount() function, debug tool. 2012-01-14 00:33:08 +01:00
Ben Noordhuis
ac218a7ed5 test: add lots of refcount tests 2012-01-14 00:22:20 +01:00
Ben Noordhuis
dc3b80a50f test: add udp4_echo_server helper 2012-01-14 00:11:43 +01:00
Ben Noordhuis
a13584bec7 unix: remove unused #define 2012-01-13 15:59:53 +01:00
Ben Noordhuis
52fba1a38f unix: fix compiler warning 2012-01-12 16:00:31 +01:00
Igor Zinkovsky
855764406e windows: improve uv_fs_stat performance (by about 60%) 2012-01-11 19:21:47 -08:00
Igor Zinkovsky
94a5c7b002 fix warnings in windows build 2012-01-11 18:12:51 -08:00
Daisuke Murase
e8494dddc0 unix: use EVRUN_ONCE in uv_run_once()
EVRUN_NOWAIT means "poll and don't block". Use EVRUN_ONCE instead, "wait for
single event".
2012-01-11 10:15:25 +01:00
Ryan Dahl
51ea46de45 Merge remote branch 'origin/v0.6' 2012-01-09 11:31:13 -08:00
Ryan Dahl
4ad33e9748 Revert "Add uv_pipe_pair for communication between threads"
Not needed. We took a different approach for isolates.

This reverts commit 5cc6090fdf.
2012-01-09 11:22:46 -08:00
Ben Noordhuis
803f5a096e linux: fix build on older distros 2012-01-09 15:43:00 +01:00
Ben Noordhuis
38fc6ad839 unix: unref fs event watcher
Watchers were being ref-counted twice which wasn't harmful in itself but stopped
uv_unref() from working like you'd expect it to.
2012-01-02 10:42:27 +01:00
Igor Zinkovsky
43e3ac5798 windows: uv_fs_rename to replace the new file if it exists
fixes #283
2011-12-30 15:48:22 -08:00
Igor Zinkovsky
4d1d02fd18 windows: ensure that uv_fs_event callbacks have long names 2011-12-30 14:59:28 -08:00
Ryan Dahl
5cc6090fdf Add uv_pipe_pair for communication between threads
This is only the Unix implementation and test.
2011-12-29 22:41:08 -08:00
Ryan Dahl
3dd4ecb493 unix: expose uv__make_socketpair, uv__make_pipe in unix/internal.h 2011-12-29 22:37:33 -08:00
Ben Noordhuis
0db56ea41a windows: implement uv_thread_self() 2011-12-29 01:40:49 +01:00
Ben Noordhuis
85f6b7952b Fix Windows build, uv_eio_channel is Unix only. 2011-12-28 14:42:46 +01:00
Ben Noordhuis
39481b7896 docs: add c-ares license note 2011-12-22 17:19:22 +01:00
Ben Noordhuis
d6a06b8689 test: eio callbacks should run in their owning threads 2011-12-22 03:42:54 +01:00
Ben Noordhuis
271aa1806c unix: eio_init() is not thread-safe, run atomically 2011-12-22 03:38:34 +01:00
Ben Noordhuis
ec8c5008aa Update AUTHORS and .mailmap 2011-12-20 20:47:33 +01:00
Paddy Byers
abf9654a55 unix: create separate eio result queue per loop
Makes the eio "done" callback run in the thread that submitted it. Makes it safe
to use libeio from multiple event loops.
2011-12-20 20:47:33 +01:00
Ben Noordhuis
10de090b9e unix: centralize loop init logic
Also fixes a bug where loops other than the main loop didn't pick the kqueue
backend, which broke the fs event watcher on Darwin and the BSDs.
2011-12-20 20:47:33 +01:00
Ben Noordhuis
6a9cb902ae Add ngx_queue_foreach() macro. 2011-12-20 20:47:33 +01:00