Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

deps: upgrade libuv to b9ed1a6

  • Loading branch information...
commit ee77a6a953c65ff1fddf4017496387c42dd84d63 1 parent 836a06f
@bnoordhuis bnoordhuis authored
Showing with 1,958 additions and 19,300 deletions.
  1. +0 −3  deps/uv/LICENSE
  2. +7 −0 deps/uv/README.md
  3. +5 −0 deps/uv/common.gypi
  4. +4 −26 deps/uv/config-unix.mk
  5. +10 −2 deps/uv/gyp_uv
  6. +0 −403 deps/uv/include/uv-private/eio.h
  7. +29 −8 deps/uv/include/uv-private/ngx-queue.h
  8. +25 −10 deps/uv/include/uv-private/uv-unix.h
  9. +21 −0 deps/uv/include/uv-private/uv-win.h
  10. +45 −43 deps/uv/include/uv.h
  11. +13 −9 deps/uv/src/fs-poll.c
  12. +0 −128 deps/uv/src/unix/core.c
  13. +0 −63 deps/uv/src/unix/eio/Changes
  14. +0 −36 deps/uv/src/unix/eio/LICENSE
  15. +0 −15 deps/uv/src/unix/eio/Makefile.am
  16. +0 −8,957 deps/uv/src/unix/eio/aclocal.m4
  17. +0 −3  deps/uv/src/unix/eio/autogen.sh
  18. +0 −86 deps/uv/src/unix/eio/config.h.in
  19. +0 −84 deps/uv/src/unix/eio/config_aix.h
  20. +0 −80 deps/uv/src/unix/eio/config_cygwin.h
  21. +0 −141 deps/uv/src/unix/eio/config_darwin.h
  22. +0 −81 deps/uv/src/unix/eio/config_freebsd.h
  23. +0 −94 deps/uv/src/unix/eio/config_linux.h
  24. +0 −81 deps/uv/src/unix/eio/config_netbsd.h
  25. +0 −137 deps/uv/src/unix/eio/config_openbsd.h
  26. +0 −84 deps/uv/src/unix/eio/config_sunos.h
  27. +0 −22 deps/uv/src/unix/eio/configure.ac
  28. +0 −194 deps/uv/src/unix/eio/demo.c
  29. +0 −370 deps/uv/src/unix/eio/ecb.h
  30. +0 −3,428 deps/uv/src/unix/eio/eio.3
  31. +0 −2,593 deps/uv/src/unix/eio/eio.c
  32. +0 −969 deps/uv/src/unix/eio/eio.pod
  33. +0 −195 deps/uv/src/unix/eio/libeio.m4
  34. +0 −164 deps/uv/src/unix/eio/xthread.h
  35. +1 −0  deps/uv/src/unix/error.c
  36. +627 −547 deps/uv/src/unix/fs.c
  37. +16 −9 deps/uv/src/unix/fsevents.c
  38. +144 −0 deps/uv/src/unix/getaddrinfo.c
  39. +7 −6 deps/uv/src/unix/internal.h
  40. +9 −1 deps/uv/src/unix/linux/linux-core.c
  41. +25 −2 deps/uv/src/unix/loop.c
  42. +2 −0  deps/uv/src/unix/stream.c
  43. +112 −0 deps/uv/src/unix/thread.c
  44. +176 −0 deps/uv/src/unix/threadpool.c
  45. +0 −107 deps/uv/src/unix/uv-eio.c
  46. +0 −13 deps/uv/src/unix/uv-eio.h
  47. +246 −1 deps/uv/src/win/thread.c
  48. +20 −0 deps/uv/src/win/winapi.c
  49. +24 −0 deps/uv/src/win/winapi.h
  50. +0 −1  deps/uv/test/benchmark-multi-accept.c
  51. +28 −6 deps/uv/test/runner-unix.c
  52. +1 −2  deps/uv/test/runner-win.c
  53. +1 −0  deps/uv/test/runner-win.h
  54. +11 −5 deps/uv/test/runner.c
  55. +1 −1  deps/uv/test/runner.h
  56. +2 −0  deps/uv/test/test-async.c
  57. +173 −0 deps/uv/test/test-condvar.c
  58. +27 −40 deps/uv/test/test-fs-event.c
  59. +0 −1  deps/uv/test/test-fs-poll.c
  60. +36 −2 deps/uv/test/test-fs.c
  61. +1 −1  deps/uv/test/test-getsockname.c
  62. +12 −0 deps/uv/test/test-list.h
  63. +16 −17 deps/uv/test/test-ping-pong.c
  64. +37 −0 deps/uv/test/test-ref.c
  65. +1 −1  deps/uv/test/test-tcp-writealot.c
  66. +8 −16 deps/uv/uv.gyp
  67. +35 −12 deps/uv/vcbuild.bat
View
3  deps/uv/LICENSE
@@ -36,9 +36,6 @@ The externally maintained libraries used by libuv are:
- libev, located at ev/ is copyright Marc Alexander Lehmann, and
dual-licensed under the MIT license and GPL2.
- - libeio, located at eio/ is copyright Marc Alexander Lehmann, and
- dual-licensed under the MIT license and GPL2.
-
- inet_pton and inet_ntop implementations, contained in src/inet.c, are
copyright the Internet Systems Consortium, Inc., and licensed under the ISC
license.
View
7 deps/uv/README.md
@@ -36,6 +36,9 @@ http://nodejs.org/
* IPC and socket sharing between processes `uv_write2`
+## Community
+
+ * [Mailing list](http://groups.google.com/group/libuv)
## Documentation
@@ -43,6 +46,10 @@ http://nodejs.org/
— API documentation in the form of detailed header comments.
* [An Introduction to libuv](http://nikhilm.github.com/uvbook/) — An
overview of libuv with tutorials.
+ * [LXJS 2012 talk](http://www.youtube.com/watch?v=nGn60vDSxQ4) - High-level
+ introductory talk about libuv.
+ * [Tests and benchmarks](https://github.com/joyent/libuv/tree/master/test) -
+ API specification and usage examples.
## Build Instructions
View
5 deps/uv/common.gypi
@@ -117,6 +117,11 @@
# POSIX names
'_CRT_NONSTDC_NO_DEPRECATE',
],
+ 'target_conditions': [
+ ['target_arch=="x64"', {
+ 'msvs_configuration_platform': 'x64'
+ }]
+ ]
}],
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
'cflags': [ '-Wall' ],
View
30 deps/uv/config-unix.mk
@@ -32,6 +32,7 @@ OBJS += src/unix/core.o
OBJS += src/unix/dl.o
OBJS += src/unix/error.o
OBJS += src/unix/fs.o
+OBJS += src/unix/getaddrinfo.o
OBJS += src/unix/loop.o
OBJS += src/unix/loop-watcher.o
OBJS += src/unix/pipe.o
@@ -41,21 +42,20 @@ OBJS += src/unix/signal.o
OBJS += src/unix/stream.o
OBJS += src/unix/tcp.o
OBJS += src/unix/thread.o
+OBJS += src/unix/threadpool.o
OBJS += src/unix/timer.o
OBJS += src/unix/tty.o
OBJS += src/unix/udp.o
ifeq (SunOS,$(uname_S))
EV_CONFIG=config_sunos.h
-EIO_CONFIG=config_sunos.h
CPPFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500
-LINKFLAGS+=-lsocket -lnsl -lkstat
+LINKFLAGS+=-lkstat -lnsl -lsendfile -lsocket
OBJS += src/unix/sunos.o
endif
ifeq (AIX,$(uname_S))
EV_CONFIG=config_aix.h
-EIO_CONFIG=config_aix.h
CPPFLAGS += -Isrc/ares/config_aix -D_ALL_SOURCE -D_XOPEN_SOURCE=500
LINKFLAGS+= -lperfstat
OBJS += src/unix/aix.o
@@ -63,7 +63,6 @@ endif
ifeq (Darwin,$(uname_S))
EV_CONFIG=config_darwin.h
-EIO_CONFIG=config_darwin.h
CPPFLAGS += -D_DARWIN_USE_64_BIT_INODE=1
LINKFLAGS+=-framework CoreServices
OBJS += src/unix/darwin.o
@@ -73,7 +72,6 @@ endif
ifeq (Linux,$(uname_S))
EV_CONFIG=config_linux.h
-EIO_CONFIG=config_linux.h
CSTDFLAG += -D_GNU_SOURCE
LINKFLAGS+=-ldl -lrt
OBJS += src/unix/linux/linux-core.o \
@@ -83,7 +81,6 @@ endif
ifeq (FreeBSD,$(uname_S))
EV_CONFIG=config_freebsd.h
-EIO_CONFIG=config_freebsd.h
LINKFLAGS+=-lkvm
OBJS += src/unix/freebsd.o
OBJS += src/unix/kqueue.o
@@ -91,7 +88,6 @@ endif
ifeq (DragonFly,$(uname_S))
EV_CONFIG=config_freebsd.h
-EIO_CONFIG=config_freebsd.h
LINKFLAGS+=
OBJS += src/unix/freebsd.o
OBJS += src/unix/kqueue.o
@@ -99,7 +95,6 @@ endif
ifeq (NetBSD,$(uname_S))
EV_CONFIG=config_netbsd.h
-EIO_CONFIG=config_netbsd.h
LINKFLAGS+=-lkvm
OBJS += src/unix/netbsd.o
OBJS += src/unix/kqueue.o
@@ -107,7 +102,6 @@ endif
ifeq (OpenBSD,$(uname_S))
EV_CONFIG=config_openbsd.h
-EIO_CONFIG=config_openbsd.h
LINKFLAGS+=-lkvm
OBJS += src/unix/openbsd.o
OBJS += src/unix/kqueue.o
@@ -115,7 +109,6 @@ endif
ifneq (,$(findstring CYGWIN,$(uname_S)))
EV_CONFIG=config_cygwin.h
-EIO_CONFIG=config_cygwin.h
# We drop the --std=c89, it hides CLOCK_MONOTONIC on cygwin
CSTDFLAG = -D_GNU_SOURCE
LINKFLAGS+=
@@ -135,7 +128,7 @@ endif
RUNNER_LIBS=
RUNNER_SRC=test/runner-unix.c
-uv.a: $(OBJS) src/fs-poll.o src/inet.o src/uv-common.o src/unix/ev/ev.o src/unix/uv-eio.o src/unix/eio/eio.o
+uv.a: $(OBJS) src/fs-poll.o src/inet.o src/uv-common.o src/unix/ev/ev.o
$(AR) rcs uv.a $^
src/%.o: src/%.c include/uv.h include/uv-private/uv-unix.h
@@ -147,29 +140,14 @@ src/unix/%.o: src/unix/%.c include/uv.h include/uv-private/uv-unix.h src/unix/in
src/unix/ev/ev.o: src/unix/ev/ev.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c src/unix/ev/ev.c -o src/unix/ev/ev.o -DEV_CONFIG_H=\"$(EV_CONFIG)\"
-
-EIO_CPPFLAGS += $(CPPFLAGS)
-EIO_CPPFLAGS += -DEIO_CONFIG_H=\"$(EIO_CONFIG)\"
-EIO_CPPFLAGS += -DEIO_STACKSIZE=262144
-EIO_CPPFLAGS += -D_GNU_SOURCE
-
-src/unix/eio/eio.o: src/unix/eio/eio.c
- $(CC) $(EIO_CPPFLAGS) $(CFLAGS) -c src/unix/eio/eio.c -o src/unix/eio/eio.o
-
-src/unix/uv-eio.o: src/unix/uv-eio.c
- $(CC) $(CPPFLAGS) -Isrc/unix/eio/ $(CSTDFLAG) $(CFLAGS) -c src/unix/uv-eio.c -o src/unix/uv-eio.o
-
-
clean-platform:
-rm -f src/unix/*.o
-rm -f src/unix/ev/*.o
- -rm -f src/unix/eio/*.o
-rm -f src/unix/linux/*.o
-rm -rf test/run-tests.dSYM run-benchmarks.dSYM
distclean-platform:
-rm -f src/unix/*.o
-rm -f src/unix/ev/*.o
- -rm -f src/unix/eio/*.o
-rm -f src/unix/linux/*.o
-rm -rf test/run-tests.dSYM run-benchmarks.dSYM
View
12 deps/uv/gyp_uv
@@ -45,6 +45,9 @@ if __name__ == '__main__':
args.append(os.path.join(uv_root, 'uv.gyp'))
common_fn = os.path.join(uv_root, 'common.gypi')
options_fn = os.path.join(uv_root, 'options.gypi')
+ # we force vs 2010 over 2008 which would otherwise be the default for gyp
+ if not os.environ.get('GYP_MSVS_VERSION'):
+ os.environ['GYP_MSVS_VERSION'] = '2010'
else:
args.append(os.path.join(os.path.abspath(uv_root), 'uv.gyp'))
common_fn = os.path.join(os.path.abspath(uv_root), 'common.gypi')
@@ -69,9 +72,14 @@ if __name__ == '__main__':
args.append('-Dgcc_version=%d' % (10 * major + minor))
args.append('-Dclang=%d' % int(is_clang))
- args.append('-Dtarget_arch=ia32')
+ if not any(a.startswith('-Dtarget_arch') for a in args):
+ args.append('-Dtarget_arch=ia32')
+
+ if not any(a.startswith('-Dlibrary') for a in args):
+ args.append('-Dlibrary=static_library')
+
args.append('-Dcomponent=static_library')
- args.append('-Dlibrary=static_library')
+
gyp_args = list(args)
print gyp_args
run_gyp(gyp_args)
View
403 deps/uv/include/uv-private/eio.h
@@ -1,403 +0,0 @@
-/*
- * libeio API header
- *
- * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libeio@schmorp.de>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modifica-
- * tion, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * the GNU General Public License ("GPL") version 2 or any later version,
- * in which case the provisions of the GPL are applicable instead of
- * the above. If you wish to allow the use of your version of this file
- * only under the terms of the GPL and not to allow others to use your
- * version of this file under the BSD license, indicate your decision
- * by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL. If you do not delete the
- * provisions above, a recipient may use your version of this file under
- * either the BSD or the GPL.
- */
-
-#ifndef EIO_H_
-#define EIO_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stddef.h>
-#include <signal.h>
-#include <sys/types.h>
-
-typedef struct eio_req eio_req;
-typedef struct eio_dirent eio_dirent;
-
-typedef int (*eio_cb)(eio_req *req);
-
-#ifndef EIO_REQ_MEMBERS
-# define EIO_REQ_MEMBERS
-#endif
-
-#ifndef EIO_STRUCT_STAT
-# ifdef _WIN32
-# define EIO_STRUCT_STAT struct _stati64
-# define EIO_STRUCT_STATI64
-# else
-# define EIO_STRUCT_STAT struct stat
-# endif
-#endif
-
-#ifdef _WIN32
- typedef int eio_uid_t;
- typedef int eio_gid_t;
- typedef int eio_mode_t;
- #ifdef __MINGW32__ /* no intptr_t */
- typedef ssize_t eio_ssize_t;
- #else
- typedef intptr_t eio_ssize_t; /* or SSIZE_T */
- #endif
- #if __GNUC__
- typedef long long eio_ino_t;
- #else
- typedef __int64 eio_ino_t; /* unsigned not supported by msvc */
- #endif
-#else
- typedef uid_t eio_uid_t;
- typedef gid_t eio_gid_t;
- typedef ssize_t eio_ssize_t;
- typedef ino_t eio_ino_t;
- typedef mode_t eio_mode_t;
-#endif
-
-#ifndef EIO_STRUCT_STATVFS
-# define EIO_STRUCT_STATVFS struct statvfs
-#endif
-
-/* for readdir */
-
-/* eio_readdir flags */
-enum
-{
- EIO_READDIR_DENTS = 0x01, /* ptr2 contains eio_dirents, not just the (unsorted) names */
- EIO_READDIR_DIRS_FIRST = 0x02, /* dirents gets sorted into a good stat() ing order to find directories first */
- EIO_READDIR_STAT_ORDER = 0x04, /* dirents gets sorted into a good stat() ing order to quickly stat all files */
- EIO_READDIR_FOUND_UNKNOWN = 0x80, /* set by eio_readdir when *_ARRAY was set and any TYPE=UNKNOWN's were found */
-
- EIO_READDIR_CUSTOM1 = 0x100, /* for use by apps */
- EIO_READDIR_CUSTOM2 = 0x200 /* for use by apps */
-};
-
-/* using "typical" values in the hope that the compiler will do something sensible */
-enum eio_dtype
-{
- EIO_DT_UNKNOWN = 0,
- EIO_DT_FIFO = 1,
- EIO_DT_CHR = 2,
- EIO_DT_MPC = 3, /* multiplexed char device (v7+coherent) */
- EIO_DT_DIR = 4,
- EIO_DT_NAM = 5, /* xenix special named file */
- EIO_DT_BLK = 6,
- EIO_DT_MPB = 7, /* multiplexed block device (v7+coherent) */
- EIO_DT_REG = 8,
- EIO_DT_NWK = 9, /* HP-UX network special */
- EIO_DT_CMP = 9, /* VxFS compressed */
- EIO_DT_LNK = 10,
- /* DT_SHAD = 11,*/
- EIO_DT_SOCK = 12,
- EIO_DT_DOOR = 13, /* solaris door */
- EIO_DT_WHT = 14,
- EIO_DT_MAX = 15 /* highest DT_VALUE ever, hopefully */
-};
-
-struct eio_dirent
-{
- int nameofs; /* offset of null-terminated name string in (char *)req->ptr2 */
- unsigned short namelen; /* size of filename without trailing 0 */
- unsigned char type; /* one of EIO_DT_* */
- signed char score; /* internal use */
- eio_ino_t inode; /* the inode number, if available, otherwise unspecified */
-};
-
-/* eio_msync flags */
-enum
-{
- EIO_MS_ASYNC = 1,
- EIO_MS_INVALIDATE = 2,
- EIO_MS_SYNC = 4
-};
-
-/* eio_mtouch flags */
-enum
-{
- EIO_MT_MODIFY = 1
-};
-
-/* eio_sync_file_range flags */
-enum
-{
- EIO_SYNC_FILE_RANGE_WAIT_BEFORE = 1,
- EIO_SYNC_FILE_RANGE_WRITE = 2,
- EIO_SYNC_FILE_RANGE_WAIT_AFTER = 4
-};
-
-/* eio_fallocate flags */
-enum
-{
- EIO_FALLOC_FL_KEEP_SIZE = 1 /* MUST match the value in linux/falloc.h */
-};
-
-/* timestamps and differences - feel free to use double in your code directly */
-typedef double eio_tstamp;
-
-/* the eio request structure */
-enum
-{
- EIO_CUSTOM,
- EIO_OPEN, EIO_CLOSE, EIO_DUP2,
- EIO_READ, EIO_WRITE,
- EIO_READAHEAD, EIO_SENDFILE,
- EIO_STAT, EIO_LSTAT, EIO_FSTAT,
- EIO_STATVFS, EIO_FSTATVFS,
- EIO_TRUNCATE, EIO_FTRUNCATE,
- EIO_UTIME, EIO_FUTIME,
- EIO_CHMOD, EIO_FCHMOD,
- EIO_CHOWN, EIO_FCHOWN,
- EIO_SYNC, EIO_FSYNC, EIO_FDATASYNC, EIO_SYNCFS,
- EIO_MSYNC, EIO_MTOUCH, EIO_SYNC_FILE_RANGE, EIO_FALLOCATE,
- EIO_MLOCK, EIO_MLOCKALL,
- EIO_UNLINK, EIO_RMDIR, EIO_MKDIR, EIO_RENAME,
- EIO_MKNOD, EIO_READDIR,
- EIO_LINK, EIO_SYMLINK, EIO_READLINK, EIO_REALPATH,
- EIO_GROUP, EIO_NOP,
- EIO_BUSY
-};
-
-/* mlockall constants */
-enum
-{
- EIO_MCL_CURRENT = 1,
- EIO_MCL_FUTURE = 2
-};
-
-/* request priorities */
-
-enum {
- EIO_PRI_MIN = -4,
- EIO_PRI_MAX = 4,
- EIO_PRI_DEFAULT = 0
-};
-
-#define ETP_PRI_MIN EIO_PRI_MIN
-#define ETP_PRI_MAX EIO_PRI_MAX
-
-#define ETP_NUM_PRI (ETP_PRI_MAX - ETP_PRI_MIN + 1)
-
-#define ETP_REQ eio_req
-
-/*
- * a somewhat faster data structure might be nice, but
- * with 8 priorities this actually needs <20 insns
- * per shift, the most expensive operation.
- */
-typedef struct {
- ETP_REQ *qs[ETP_NUM_PRI], *qe[ETP_NUM_PRI]; /* qstart, qend */
- int size;
-} etp_reqq;
-
-typedef struct {
- etp_reqq res_queue; /* queue of outstanding responses for this channel */
- void *data; /* use this for what you want */
-} eio_channel;
-
-/* eio request structure */
-/* this structure is mostly read-only */
-/* when initialising it, all members must be zero-initialised */
-struct eio_req
-{
- eio_req volatile *next; /* private ETP */
-
- eio_ssize_t result; /* result of syscall, e.g. result = read (... */
- off_t offs; /* read, write, truncate, readahead, sync_file_range, fallocate: file offset, mknod: dev_t */
- size_t size; /* read, write, readahead, sendfile, msync, mlock, sync_file_range, fallocate: length */
- void *ptr1; /* all applicable requests: pathname, old name; readdir: optional eio_dirents */
- void *ptr2; /* all applicable requests: new name or memory buffer; readdir: name strings */
- eio_tstamp nv1; /* utime, futime: atime; busy: sleep time */
- eio_tstamp nv2; /* utime, futime: mtime */
-
- int type; /* EIO_xxx constant ETP */
- int int1; /* all applicable requests: file descriptor; sendfile: output fd; open, msync, mlockall, readdir: flags */
- long int2; /* chown, fchown: uid; sendfile: input fd; open, chmod, mkdir, mknod: file mode, sync_file_range, fallocate: flags */
- long int3; /* chown, fchown: gid */
- int errorno; /* errno value on syscall return */
-
- eio_channel *channel; /* data used to direct poll callbacks arising from this req */
-
-#if defined(__i386) || defined(__amd64)
- unsigned char cancelled;
-#else
- sig_atomic_t cancelled;
-#endif
-
- unsigned char flags; /* private */
- signed char pri; /* the priority */
-
- void *data;
- eio_cb finish;
- void (*destroy)(eio_req *req); /* called when request no longer needed */
- void (*feed)(eio_req *req); /* only used for group requests */
-
- EIO_REQ_MEMBERS
-
- eio_req *grp, *grp_prev, *grp_next, *grp_first; /* private */
-};
-
-/* _private_ request flags */
-enum {
- EIO_FLAG_PTR1_FREE = 0x01, /* need to free(ptr1) */
- EIO_FLAG_PTR2_FREE = 0x02, /* need to free(ptr2) */
- EIO_FLAG_GROUPADD = 0x04 /* some request was added to the group */
-};
-
-/* undocumented/unsupported/private helper */
-/*void eio_page_align (void **addr, size_t *length);*/
-
-/* returns < 0 on error, errno set
- * need_poll, if non-zero, will be called when results are available
- * and eio_poll_cb needs to be invoked (it MUST NOT call eio_poll_cb itself).
- * done_poll is called when the need to poll is gone.
- */
-int eio_init (void (*want_poll)(eio_channel *), void (*done_poll)(eio_channel *));
-
-/* initialises a channel */
-void eio_channel_init(eio_channel *, void *data);
-
-/* must be called regularly to handle pending requests */
-/* returns 0 if all requests were handled, -1 if not, or the value of EIO_FINISH if != 0 */
-int eio_poll (eio_channel *channel);
-
-/* stop polling if poll took longer than duration seconds */
-void eio_set_max_poll_time (eio_tstamp nseconds);
-/* do not handle more then count requests in one call to eio_poll_cb */
-void eio_set_max_poll_reqs (unsigned int nreqs);
-
-/* set minimum required number
- * maximum wanted number
- * or maximum idle number of threads */
-void eio_set_min_parallel (unsigned int nthreads);
-void eio_set_max_parallel (unsigned int nthreads);
-void eio_set_max_idle (unsigned int nthreads);
-void eio_set_idle_timeout (unsigned int seconds);
-
-unsigned int eio_nreqs (void); /* number of requests in-flight */
-unsigned int eio_nready (void); /* number of not-yet handled requests */
-unsigned int eio_npending (void); /* number of finished but unhandled requests */
-unsigned int eio_nthreads (void); /* number of worker threads in use currently */
-
-/*****************************************************************************/
-/* convenience wrappers */
-
-#ifndef EIO_NO_WRAPPERS
-eio_req *eio_nop (int pri, eio_cb cb, void *data, eio_channel *channel); /* does nothing except go through the whole process */
-eio_req *eio_busy (eio_tstamp delay, int pri, eio_cb cb, void *data, eio_channel *channel); /* ties a thread for this long, simulating busyness */
-eio_req *eio_sync (int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_fsync (int fd, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_fdatasync (int fd, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_syncfs (int fd, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_msync (void *addr, size_t length, int flags, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_mtouch (void *addr, size_t length, int flags, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_mlock (void *addr, size_t length, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_mlockall (int flags, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_sync_file_range (int fd, off_t offset, size_t nbytes, unsigned int flags, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_fallocate (int fd, int mode, off_t offset, size_t len, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_close (int fd, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_readahead (int fd, off_t offset, size_t length, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_read (int fd, void *buf, size_t length, off_t offset, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_write (int fd, void *buf, size_t length, off_t offset, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_fstat (int fd, int pri, eio_cb cb, void *data, eio_channel *channel); /* stat buffer=ptr2 allocated dynamically */
-eio_req *eio_fstatvfs (int fd, int pri, eio_cb cb, void *data, eio_channel *channel); /* stat buffer=ptr2 allocated dynamically */
-eio_req *eio_futime (int fd, eio_tstamp atime, eio_tstamp mtime, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_ftruncate (int fd, off_t offset, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_fchmod (int fd, eio_mode_t mode, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_fchown (int fd, eio_uid_t uid, eio_gid_t gid, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_dup2 (int fd, int fd2, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_sendfile (int out_fd, int in_fd, off_t in_offset, size_t length, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_open (const char *path, int flags, eio_mode_t mode, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_utime (const char *path, eio_tstamp atime, eio_tstamp mtime, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_truncate (const char *path, off_t offset, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_chown (const char *path, eio_uid_t uid, eio_gid_t gid, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_chmod (const char *path, eio_mode_t mode, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_mkdir (const char *path, eio_mode_t mode, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_readdir (const char *path, int flags, int pri, eio_cb cb, void *data, eio_channel *channel); /* result=ptr2 allocated dynamically */
-eio_req *eio_rmdir (const char *path, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_unlink (const char *path, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_readlink (const char *path, int pri, eio_cb cb, void *data, eio_channel *channel); /* result=ptr2 allocated dynamically */
-eio_req *eio_realpath (const char *path, int pri, eio_cb cb, void *data, eio_channel *channel); /* result=ptr2 allocated dynamically */
-eio_req *eio_stat (const char *path, int pri, eio_cb cb, void *data, eio_channel *channel); /* stat buffer=ptr2 allocated dynamically */
-eio_req *eio_lstat (const char *path, int pri, eio_cb cb, void *data, eio_channel *channel); /* stat buffer=ptr2 allocated dynamically */
-eio_req *eio_statvfs (const char *path, int pri, eio_cb cb, void *data, eio_channel *channel); /* stat buffer=ptr2 allocated dynamically */
-eio_req *eio_mknod (const char *path, eio_mode_t mode, dev_t dev, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_link (const char *path, const char *new_path, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_symlink (const char *path, const char *new_path, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_rename (const char *path, const char *new_path, int pri, eio_cb cb, void *data, eio_channel *channel);
-eio_req *eio_custom (void (*execute)(eio_req *), int pri, eio_cb cb, void *data, eio_channel *channel);
-#endif
-
-/*****************************************************************************/
-/* groups */
-
-eio_req *eio_grp (eio_cb cb, void *data, eio_channel *channel);
-void eio_grp_feed (eio_req *grp, void (*feed)(eio_req *req), int limit);
-void eio_grp_limit (eio_req *grp, int limit);
-void eio_grp_add (eio_req *grp, eio_req *req);
-void eio_grp_cancel (eio_req *grp); /* cancels all sub requests but not the group */
-
-/*****************************************************************************/
-/* request api */
-
-/* true if the request was cancelled, useful in the invoke callback */
-#define EIO_CANCELLED(req) ((req)->cancelled)
-
-#define EIO_RESULT(req) ((req)->result)
-/* returns a pointer to the result buffer allocated by eio */
-#define EIO_BUF(req) ((req)->ptr2)
-#define EIO_STAT_BUF(req) ((EIO_STRUCT_STAT *)EIO_BUF(req))
-#define EIO_STATVFS_BUF(req) ((EIO_STRUCT_STATVFS *)EIO_BUF(req))
-#define EIO_PATH(req) ((char *)(req)->ptr1)
-
-/* submit a request for execution */
-void eio_submit (eio_req *req);
-/* cancel a request as soon fast as possible, if possible */
-void eio_cancel (eio_req *req);
-
-/*****************************************************************************/
-/* convenience functions */
-
-eio_ssize_t eio_sendfile_sync (int ofd, int ifd, off_t offset, size_t count);
-eio_ssize_t eio__pread (int fd, void *buf, size_t count, off_t offset);
-eio_ssize_t eio__pwrite (int fd, void *buf, size_t count, off_t offset);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
View
37 deps/uv/include/uv-private/ngx-queue.h
@@ -17,8 +17,11 @@ struct ngx_queue_s {
#define ngx_queue_init(q) \
+ do { \
(q)->prev = q; \
- (q)->next = q
+ (q)->next = q; \
+ } \
+ while (0)
#define ngx_queue_empty(h) \
@@ -26,20 +29,26 @@ struct ngx_queue_s {
#define ngx_queue_insert_head(h, x) \
+ do { \
(x)->next = (h)->next; \
(x)->next->prev = x; \
(x)->prev = h; \
- (h)->next = x
+ (h)->next = x; \
+ } \
+ while (0)
#define ngx_queue_insert_after ngx_queue_insert_head
#define ngx_queue_insert_tail(h, x) \
+ do { \
(x)->prev = (h)->prev; \
(x)->prev->next = x; \
(x)->next = h; \
- (h)->prev = x
+ (h)->prev = x; \
+ } \
+ while (0)
#define ngx_queue_head(h) \
@@ -65,38 +74,50 @@ struct ngx_queue_s {
#if defined(NGX_DEBUG)
#define ngx_queue_remove(x) \
+ do { \
(x)->next->prev = (x)->prev; \
(x)->prev->next = (x)->next; \
(x)->prev = NULL; \
- (x)->next = NULL
+ (x)->next = NULL; \
+ } \
+ while (0)
#else
#define ngx_queue_remove(x) \
+ do { \
(x)->next->prev = (x)->prev; \
- (x)->prev->next = (x)->next
+ (x)->prev->next = (x)->next; \
+ } \
+ while (0)
#endif
#define ngx_queue_split(h, q, n) \
+ do { \
(n)->prev = (h)->prev; \
(n)->prev->next = n; \
(n)->next = q; \
(h)->prev = (q)->prev; \
(h)->prev->next = h; \
- (q)->prev = n;
+ (q)->prev = n; \
+ } \
+ while (0)
#define ngx_queue_add(h, n) \
+ do { \
(h)->prev->next = (n)->next; \
(n)->next->prev = (h)->prev; \
(h)->prev = (n)->prev; \
- (h)->prev->next = h;
+ (h)->prev->next = h; \
+ } \
+ while (0)
#define ngx_queue_data(q, type, link) \
- (type *) ((unsigned char *) q - offsetof(type, link))
+ ((type *) ((unsigned char *) q - offsetof(type, link)))
#define ngx_queue_foreach(q, h) \
View
35 deps/uv/include/uv-private/uv-unix.h
@@ -25,7 +25,6 @@
#include "ngx-queue.h"
#include "ev.h"
-#include "eio.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -54,6 +53,13 @@ struct uv__io_s {
ev_io io_watcher;
};
+struct uv__work {
+ void (*work)(struct uv__work *w);
+ void (*done)(struct uv__work *w);
+ struct uv_loop_s* loop;
+ ngx_queue_t wq;
+};
+
#if defined(__linux__)
# include "uv-linux.h"
#elif defined(__sun)
@@ -100,6 +106,7 @@ typedef pthread_t uv_thread_t;
typedef pthread_mutex_t uv_mutex_t;
typedef pthread_rwlock_t uv_rwlock_t;
typedef UV_PLATFORM_SEM_T uv_sem_t;
+typedef pthread_cond_t uv_cond_t;
/* Platform-specific definitions for uv_spawn support. */
typedef gid_t uv_gid_t;
@@ -115,13 +122,10 @@ typedef struct {
#define UV_LOOP_PRIVATE_FIELDS \
unsigned long flags; \
- /* Poll result queue */ \
- eio_channel uv_eio_channel; \
struct ev_loop* ev; \
- /* Various thing for libeio. */ \
- uv_async_t uv_eio_want_poll_notifier; \
- uv_async_t uv_eio_done_poll_notifier; \
- uv_idle_t uv_eio_poller; \
+ ngx_queue_t wq; \
+ uv_mutex_t wq_mutex; \
+ uv_async_t wq_async; \
uv_handle_t* closing_handles; \
ngx_queue_t process_handles[1]; \
ngx_queue_t prepare_handles; \
@@ -233,6 +237,7 @@ typedef struct {
uint64_t repeat;
#define UV_GETADDRINFO_PRIVATE_FIELDS \
+ struct uv__work work_req; \
uv_getaddrinfo_cb cb; \
struct addrinfo* hints; \
char* hostname; \
@@ -245,12 +250,22 @@ typedef struct {
int errorno; \
#define UV_FS_PRIVATE_FIELDS \
- struct stat statbuf; \
+ const char *new_path; \
uv_file file; \
- eio_req* eio; \
+ int flags; \
+ mode_t mode; \
+ void* buf; \
+ size_t len; \
+ off_t off; \
+ uid_t uid; \
+ gid_t gid; \
+ double atime; \
+ double mtime; \
+ struct uv__work work_req; \
+ struct stat statbuf; \
#define UV_WORK_PRIVATE_FIELDS \
- eio_req* eio;
+ struct uv__work work_req;
#define UV_TTY_PRIVATE_FIELDS \
struct termios orig_termios; \
View
21 deps/uv/include/uv-private/uv-win.h
@@ -171,6 +171,10 @@ typedef int (WSAAPI* LPFN_WSARECVFROM)
typedef NTSTATUS *PNTSTATUS;
#endif
+#ifndef RTL_CONDITION_VARIABLE_INIT
+ typedef PVOID CONDITION_VARIABLE, *PCONDITION_VARIABLE;
+#endif
+
typedef struct _AFD_POLL_HANDLE_INFO {
HANDLE Handle;
ULONG Events;
@@ -208,6 +212,23 @@ typedef HANDLE uv_sem_t;
typedef CRITICAL_SECTION uv_mutex_t;
+/* This condition variable implementation is based on the SetEvent solution
+ * (section 3.2) at http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
+ * We could not use the SignalObjectAndWait solution (section 3.4) because
+ * it want the 2nd argument (type uv_mutex_t) of uv_cond_wait() and
+ * uv_cond_timedwait() to be HANDLEs, but we use CRITICAL_SECTIONs.
+ */
+
+typedef union {
+ CONDITION_VARIABLE cond_var;
+ struct {
+ unsigned int waiters_count;
+ CRITICAL_SECTION waiters_count_lock;
+ HANDLE signal_event;
+ HANDLE broadcast_event;
+ } fallback;
+} uv_cond_t;
+
typedef union {
/* srwlock_ has type SRWLOCK, but not all toolchains define this type in */
/* windows.h. */
View
88 deps/uv/include/uv.h
@@ -139,11 +139,13 @@ typedef enum {
XX(CHECK, check) \
XX(FS_EVENT, fs_event) \
XX(FS_POLL, fs_poll) \
+ XX(HANDLE, handle) \
XX(IDLE, idle) \
XX(NAMED_PIPE, pipe) \
XX(POLL, poll) \
XX(PREPARE, prepare) \
XX(PROCESS, process) \
+ XX(STREAM, stream) \
XX(TCP, tcp) \
XX(TIMER, timer) \
XX(TTY, tty) \
@@ -151,6 +153,7 @@ typedef enum {
XX(SIGNAL, signal) \
#define UV_REQ_TYPE_MAP(XX) \
+ XX(REQ, req) \
XX(CONNECT, connect) \
XX(WRITE, write) \
XX(SHUTDOWN, shutdown) \
@@ -209,7 +212,6 @@ typedef struct uv_fs_s uv_fs_t;
typedef struct uv_work_s uv_work_t;
/* None of the above. */
-typedef struct uv_counters_s uv_counters_t;
typedef struct uv_cpu_info_s uv_cpu_info_t;
typedef struct uv_interface_address_s uv_interface_address_t;
@@ -386,12 +388,11 @@ struct uv_shutdown_s {
#define UV_HANDLE_FIELDS \
- /* read-only */ \
- uv_loop_t* loop; \
/* public */ \
uv_close_cb close_cb; \
void* data; \
/* read-only */ \
+ uv_loop_t* loop; \
uv_handle_type type; \
/* private */ \
ngx_queue_t handle_queue; \
@@ -607,12 +608,14 @@ UV_EXTERN int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock);
/* Enable/disable Nagle's algorithm. */
UV_EXTERN int uv_tcp_nodelay(uv_tcp_t* handle, int enable);
-/* Enable/disable TCP keep-alive.
+/*
+ * Enable/disable TCP keep-alive.
*
- * `ms` is the initial delay in seconds, ignored when `enable` is zero.
+ * `delay` is the initial delay in seconds, ignored when `enable` is zero.
*/
-UV_EXTERN int uv_tcp_keepalive(uv_tcp_t* handle, int enable,
- unsigned int delay);
+UV_EXTERN int uv_tcp_keepalive(uv_tcp_t* handle,
+ int enable,
+ unsigned int delay);
/*
* This setting applies to Windows only.
@@ -937,8 +940,8 @@ UV_EXTERN uv_handle_type uv_guess_handle(uv_file file);
struct uv_pipe_s {
UV_HANDLE_FIELDS
UV_STREAM_FIELDS
- UV_PIPE_PRIVATE_FIELDS
int ipc; /* non-zero if this pipe is used for passing handles */
+ UV_PIPE_PRIVATE_FIELDS
};
/*
@@ -1564,16 +1567,6 @@ struct uv_fs_poll_s {
UV_HANDLE_FIELDS
/* Private, don't touch. */
void* poll_ctx;
- /* v0.8 ABI compatibility */
- char padding[sizeof(int)
- + sizeof(unsigned int)
- + sizeof(uint64_t)
- + sizeof(char*)
- + sizeof(uv_fs_poll_cb)
- + sizeof(uv_timer_t)
- + sizeof(uv_fs_t*)
- + sizeof(uv_statbuf_t)
- - sizeof(void*)];
};
UV_EXTERN int uv_fs_poll_init(uv_loop_t* loop, uv_fs_poll_t* handle);
@@ -1637,8 +1630,8 @@ UV_EXTERN int uv_fs_poll_stop(uv_fs_poll_t* handle);
struct uv_signal_s {
UV_HANDLE_FIELDS
uv_signal_cb signal_cb;
- UV_SIGNAL_PRIVATE_FIELDS
int signum;
+ UV_SIGNAL_PRIVATE_FIELDS
};
/* These functions are no-ops on Windows. */
@@ -1799,6 +1792,36 @@ UV_EXTERN void uv_sem_post(uv_sem_t* sem);
UV_EXTERN void uv_sem_wait(uv_sem_t* sem);
UV_EXTERN int uv_sem_trywait(uv_sem_t* sem);
+/*
+ * Same goes for the condition variable functions.
+ */
+UV_EXTERN int uv_cond_init(uv_cond_t* cond);
+UV_EXTERN void uv_cond_destroy(uv_cond_t* cond);
+UV_EXTERN void uv_cond_signal(uv_cond_t* cond);
+UV_EXTERN void uv_cond_broadcast(uv_cond_t* cond);
+/* Waits on a condition variable without a timeout.
+ *
+ * Note:
+ * 1. callers should be prepared to deal with spurious wakeups.
+ */
+UV_EXTERN void uv_cond_wait(uv_cond_t* cond, uv_mutex_t* mutex);
+/* Waits on a condition variable with a timeout in nano seconds.
+ * Returns 0 for success or -1 on timeout, * aborts when other errors happen.
+ *
+ * Note:
+ * 1. callers should be prepared to deal with spurious wakeups.
+ * 2. the granularity of timeout on Windows is never less than one millisecond.
+ * 3. uv_cond_timedwait takes a relative timeout, not an absolute time.
+ * 4. the precision of timeout on OSX is never less than one microsecond.
+ * Here is the reason.
+ * OSX doesn't support CLOCK_MONOTONIC nor pthread_condattr_setclock()
+ * (see man pthread_cond_init on OSX).
+ * An example in man pthread_cond_timedwait on OSX uses gettimeofday()
+ * and its resolution is a microsecond.
+ */
+UV_EXTERN int uv_cond_timedwait(uv_cond_t* cond, uv_mutex_t* mutex,
+ uint64_t timeout);
+
/* Runs a function once and only once. Concurrent calls to uv_once() with the
* same guard will block all callers except one (it's unspecified which one).
* The guard should be initialized statically with the UV_ONCE_INIT macro.
@@ -1841,37 +1864,16 @@ union uv_any_req {
};
-struct uv_counters_s {
- uint64_t async_init;
- uint64_t check_init;
- uint64_t eio_init;
- uint64_t fs_event_init;
- uint64_t fs_poll_init;
- uint64_t handle_init;
- uint64_t idle_init;
- uint64_t pipe_init;
- uint64_t poll_init;
- uint64_t prepare_init;
- uint64_t process_init;
- uint64_t req_init;
- uint64_t stream_init;
- uint64_t tcp_init;
- uint64_t timer_init;
- uint64_t tty_init;
- uint64_t udp_init;
-};
-
-
struct uv_loop_s {
- UV_LOOP_PRIVATE_FIELDS
+ /* User data - use this for whatever. */
+ void* data;
/* The last error */
uv_err_t last_err;
/* Loop reference counting */
unsigned int active_handles;
ngx_queue_t handle_queue;
ngx_queue_t active_reqs;
- /* User data - use this for whatever. */
- void* data;
+ UV_LOOP_PRIVATE_FIELDS
};
View
22 deps/uv/src/fs-poll.c
@@ -103,11 +103,15 @@ int uv_fs_poll_stop(uv_fs_poll_t* handle) {
ctx = handle->poll_ctx;
assert(ctx != NULL);
assert(ctx->parent_handle != NULL);
-
ctx->parent_handle = NULL;
- uv_timer_stop(&ctx->timer_handle);
-
handle->poll_ctx = NULL;
+
+ /* Close the timer if it's active. If it's inactive, there's a stat request
+ * in progress and poll_cb will take care of the cleanup.
+ */
+ if (uv__is_active(&ctx->timer_handle))
+ uv_close((uv_handle_t*)&ctx->timer_handle, timer_close_cb);
+
uv__handle_stop(handle);
return 0;
@@ -123,12 +127,7 @@ static void timer_cb(uv_timer_t* timer, int status) {
struct poll_ctx* ctx;
ctx = container_of(timer, struct poll_ctx, timer_handle);
-
- if (ctx->parent_handle == NULL) { /* handle has been stopped or closed */
- uv_close((uv_handle_t*)&ctx->timer_handle, timer_close_cb);
- return;
- }
-
+ assert(ctx->parent_handle != NULL);
assert(ctx->parent_handle->poll_ctx == ctx);
ctx->start_time = uv_now(ctx->loop);
@@ -171,6 +170,11 @@ static void poll_cb(uv_fs_t* req) {
out:
uv_fs_req_cleanup(req);
+ if (ctx->parent_handle == NULL) { /* handle has been stopped by callback */
+ uv_close((uv_handle_t*)&ctx->timer_handle, timer_close_cb);
+ return;
+ }
+
/* Reschedule timer, subtract the delay from doing the stat(). */
interval = ctx->interval;
interval -= (uv_now(ctx->loop) - ctx->start_time) % interval;
View
128 deps/uv/src/unix/core.c
@@ -299,134 +299,6 @@ int uv_is_active(const uv_handle_t* handle) {
}
-static int uv_getaddrinfo_done(eio_req* req_) {
- uv_getaddrinfo_t* req = req_->data;
- struct addrinfo *res = req->res;
-#if __sun
- size_t hostlen = strlen(req->hostname);
-#endif
-
- req->res = NULL;
-
- uv__req_unregister(req->loop, req);
-
- /* see initialization in uv_getaddrinfo() */
- if (req->hints)
- free(req->hints);
- else if (req->service)
- free(req->service);
- else if (req->hostname)
- free(req->hostname);
- else
- assert(0);
-
- if (req->retcode == 0) {
- /* OK */
-#if EAI_NODATA /* FreeBSD deprecated EAI_NODATA */
- } else if (req->retcode == EAI_NONAME || req->retcode == EAI_NODATA) {
-#else
- } else if (req->retcode == EAI_NONAME) {
-#endif
- uv__set_sys_error(req->loop, ENOENT); /* FIXME compatibility hack */
-#if __sun
- } else if (req->retcode == EAI_MEMORY && hostlen >= MAXHOSTNAMELEN) {
- uv__set_sys_error(req->loop, ENOENT);
-#endif
- } else {
- req->loop->last_err.code = UV_EADDRINFO;
- req->loop->last_err.sys_errno_ = req->retcode;
- }
-
- req->cb(req, req->retcode, res);
-
- return 0;
-}
-
-
-static void getaddrinfo_thread_proc(eio_req *req_) {
- uv_getaddrinfo_t* req = req_->data;
-
- req->retcode = getaddrinfo(req->hostname,
- req->service,
- req->hints,
- &req->res);
-}
-
-
-int uv_getaddrinfo(uv_loop_t* loop,
- uv_getaddrinfo_t* req,
- uv_getaddrinfo_cb cb,
- const char* hostname,
- const char* service,
- const struct addrinfo* hints) {
- size_t hostname_len;
- size_t service_len;
- size_t hints_len;
- eio_req* req_;
- size_t len;
- char* buf;
-
- if (req == NULL || cb == NULL || (hostname == NULL && service == NULL))
- return uv__set_artificial_error(loop, UV_EINVAL);
-
- uv_eio_init(loop);
-
- hostname_len = hostname ? strlen(hostname) + 1 : 0;
- service_len = service ? strlen(service) + 1 : 0;
- hints_len = hints ? sizeof(*hints) : 0;
- buf = malloc(hostname_len + service_len + hints_len);
-
- if (buf == NULL)
- return uv__set_artificial_error(loop, UV_ENOMEM);
-
- uv__req_init(loop, req, UV_GETADDRINFO);
- req->loop = loop;
- req->cb = cb;
- req->res = NULL;
- req->hints = NULL;
- req->service = NULL;
- req->hostname = NULL;
- req->retcode = 0;
-
- /* order matters, see uv_getaddrinfo_done() */
- len = 0;
-
- if (hints) {
- req->hints = memcpy(buf + len, hints, sizeof(*hints));
- len += sizeof(*hints);
- }
-
- if (service) {
- req->service = memcpy(buf + len, service, service_len);
- len += service_len;
- }
-
- if (hostname) {
- req->hostname = memcpy(buf + len, hostname, hostname_len);
- len += hostname_len;
- }
-
- req_ = eio_custom(getaddrinfo_thread_proc,
- EIO_PRI_DEFAULT,
- uv_getaddrinfo_done,
- req,
- &loop->uv_eio_channel);
-
- if (req_)
- return 0;
-
- free(buf);
-
- return uv__set_artificial_error(loop, UV_ENOMEM);
-}
-
-
-void uv_freeaddrinfo(struct addrinfo* ai) {
- if (ai)
- freeaddrinfo(ai);
-}
-
-
/* Open a socket in non-blocking close-on-exec mode, atomically if possible. */
int uv__socket(int domain, int type, int protocol) {
int sockfd;
View
63 deps/uv/src/unix/eio/Changes
@@ -1,63 +0,0 @@
-Revision history for libeio
-
-TODO: maybe add mincore support? available on at least darwin, solaris, linux, freebsd
-TODO: openbsd requires stdint.h for intptr_t - why posix?
-
-TODO: make mtouch/readdir maybe others cancellable in-request
-TODO: fadvise request
-1.0
- - fix a deadlock where a wakeup signal could be missed when
- a timeout occured at the same time.
- - use nonstandard but maybe-working-on-bsd fork technique.
- - use fewer time() syscalls when waiting for new requests.
- - fix a path-memory-leak in readdir when using the wrappers
- (reported by Thomas L. Shinnick).
- - support a max_idle value of 0.
- - support setting of idle timeout value (eio_set_idle_timeout).
- - readdir: correctly handle malloc failures.
- - readdir: new flags argument, can return inode
- and possibly filetype, can sort in various ways.
- - readdir: stop immediately when cancelled, do
- not continue reading the directory.
- - fix return value of eio_sendfile_sync.
- - include sys/mman.h for msync.
- - added EIO_STACKSIZE.
- - added msync, mtouch support (untested).
- - added sync_file_range (untested).
- - fixed custom support.
- - use a more robust feed-add detection method.
- - "outbundled" from IO::AIO.
- - eio_set_max_polltime did not properly convert time to ticks.
- - tentatively support darwin in sendfile.
- - fix freebsd/darwin sendfile.
- - also use sendfile emulation for ENOTSUP and EOPNOTSUPP
- error codes.
- - add OS-independent EIO_MT_* and EIO_MS_* flag enums.
- - add eio_statvfs/eio_fstatvfs.
- - add eio_mlock/eio_mlockall and OS-independent MCL_* flag enums.
- - no longer set errno to 0 before making syscalls, this only lures
- people into the trap of believing errno shows success or failure.
- - "fix" demo.c so that it works as non-root.
- - suppoert utimes seperately from futimes, as some systems have
- utimes but not futimes.
- - use _POSIX_MEMLOCK_RANGE for mlock.
- - do not (errornously) overwrite CFLAGS in configure.ac.
- - mknod used int3 for dev_t (§2 bit), not offs (64 bit).
- - fix memory corruption in eio_readdirx for the flags
- combination EIO_READDIR_STAT_ORDER | EIO_READDIR_DIRS_FIRST.
- - port to openbsd (another blatantly broken non-UNIX/POSIX platform).
- - fix eio_custom prototype.
- - work around a Linux (and likely FreeBSD and other kernels) bug
- where sendfile would not transfer all the requested bytes on
- large transfers, using a heuristic.
- - use libecb, and apply lots of minor space optimisations.
- - disable sendfile on darwin, broken as everything else.
- - add realpath request and implementation.
- - cancelled requests will still invoke their request callbacks.
- - add fallocate.
- - do not acquire any locks when forking.
- - incorporated some mingw32 changes by traviscline.
- - added syncfs support, using direct syscall.
- - set thread name on linux (ps -L/Hcx, top, gdb).
- - remove useless use of volatile variables.
-
View
36 deps/uv/src/unix/eio/LICENSE
@@ -1,36 +0,0 @@
-All files in libeio are Copyright (C)2007,2008 Marc Alexander Lehmann.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Alternatively, the contents of this package may be used under the terms
-of the GNU General Public License ("GPL") version 2 or any later version,
-in which case the provisions of the GPL are applicable instead of the
-above. If you wish to allow the use of your version of this package only
-under the terms of the GPL and not to allow others to use your version of
-this file under the BSD license, indicate your decision by deleting the
-provisions above and replace them with the notice and other provisions
-required by the GPL in this and the other files of this package. If you do
-not delete the provisions above, a recipient may use your version of this
-file under either the BSD or the GPL.
View
15 deps/uv/src/unix/eio/Makefile.am
@@ -1,15 +0,0 @@
-AUTOMAKE_OPTIONS = foreign no-dependencies
-
-VERSION_INFO = 1:0
-
-EXTRA_DIST = LICENSE Changes autogen.sh
-
-#man_MANS = ev.3
-
-include_HEADERS = eio.h
-
-lib_LTLIBRARIES = libeio.la
-
-libeio_la_SOURCES = eio.c ecb.h xthread.h config.h
-libeio_la_LDFLAGS = -version-info $(VERSION_INFO)
-
View
8,957 deps/uv/src/unix/eio/aclocal.m4
0 additions, 8,957 deletions not shown
View
3  deps/uv/src/unix/eio/autogen.sh
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-autoreconf --install --symlink --force
View
86 deps/uv/src/unix/eio/config.h.in
@@ -1,86 +0,0 @@
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* fdatasync(2) is available */
-#undef HAVE_FDATASYNC
-
-/* futimes(2) is available */
-#undef HAVE_FUTIMES
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* posix_fadvise(2) is available */
-#undef HAVE_POSIX_FADVISE
-
-/* posix_madvise(2) is available */
-#undef HAVE_POSIX_MADVISE
-
-/* pread(2) and pwrite(2) are available */
-#undef HAVE_PREADWRITE
-
-/* readahead(2) is available (linux) */
-#undef HAVE_READAHEAD
-
-/* sendfile(2) is available and supported */
-#undef HAVE_SENDFILE
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* sync_file_range(2) is available */
-#undef HAVE_SYNC_FILE_RANGE
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* utimes(2) is available */
-#undef HAVE_UTIMES
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#undef LT_OBJDIR
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
View
84 deps/uv/src/unix/eio/config_aix.h
@@ -1,84 +0,0 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* fdatasync(2) is available */
-/* #undef HAVE_FDATASYNC */
-
-/* utimes(2) is available */
-#define HAVE_UTIMES 1
-
-/* futimes(2) is available */
-/* #undef HAVE_FUTIMES */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* pread(2) and pwrite(2) are available */
-#define HAVE_PREADWRITE 1
-
-/* readahead(2) is available (linux) */
-/* #undef HAVE_READAHEAD */
-
-/* sendfile(2) is available and supported */
-/* #undef HAVE_SENDFILE */
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* sync_file_range(2) is available */
-/* #undef HAVE_SYNC_FILE_RANGE */
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR ".libs/"
-
-/* Name of package */
-#define PACKAGE "libeio"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-#define VERSION "1.0"
View
80 deps/uv/src/unix/eio/config_cygwin.h
@@ -1,80 +0,0 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* fdatasync(2) is available */
-#define HAVE_FDATASYNC 1
-
-/* utimes(2) is available */
-#define HAVE_UTIMES 1
-
-/* futimes(2) is available */
-#define HAVE_FUTIMES 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* pread(2) and pwrite(2) are available */
-#define HAVE_PREADWRITE 1
-
-/* readahead(2) is available (linux) */
-/* #undef HAVE_READAHEAD */
-
-/* sendfile(2) is available and supported */
-/* #undef HAVE_SENDFILE */
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* sync_file_range(2) is available */
-/* #undef HAVE_SYNC_FILE_RANGE */
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Name of package */
-#define PACKAGE "libeio"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-#define VERSION "1.0"
View
141 deps/uv/src/unix/eio/config_darwin.h
@@ -1,141 +0,0 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* fallocate(2) is available */
-/* #undef HAVE_FALLOCATE */
-
-/* fdatasync(2) is available */
-#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060
-#define HAVE_FDATASYNC 1
-#else
-#define HAVE_FDATASYNC 0
-#endif
-
-/* futimes(2) is available */
-#define HAVE_FUTIMES 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* posix_fadvise(2) is available */
-/* #undef HAVE_POSIX_FADVISE */
-
-/* posix_madvise(2) is available */
-#define HAVE_POSIX_MADVISE 1
-
-/* prctl(PR_SET_NAME) is available */
-/* #undef HAVE_PRCTL_SET_NAME */
-
-/* pread(2) and pwrite(2) are available */
-#define HAVE_PREADWRITE 1
-
-/* readahead(2) is available (linux) */
-/* #undef HAVE_READAHEAD */
-
-/* sendfile(2) is available and supported */
-#define HAVE_SENDFILE 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* sync_file_range(2) is available */
-/* #undef HAVE_SYNC_FILE_RANGE */
-
-/* Define to 1 if you have the <sys/prctl.h> header file. */
-/* #undef HAVE_SYS_PRCTL_H */
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* syscall(__NR_syncfs) is available */
-/* #undef HAVE_SYS_SYNCFS */
-
-/* Define to 1 if you have the <sys/syscall.h> header file. */
-#define HAVE_SYS_SYSCALL_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* utimes(2) is available */
-#define HAVE_UTIMES 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR ".libs/"
-
-/* Name of package */
-#define PACKAGE "libeio"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Enable extensions on AIX 3, Interix. */
-#ifndef _ALL_SOURCE
-# define _ALL_SOURCE 1
-#endif
-/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-/* Enable threading extensions on Solaris. */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# define _POSIX_PTHREAD_SEMANTICS 1
-#endif
-/* Enable extensions on HP NonStop. */
-#ifndef _TANDEM_SOURCE
-# define _TANDEM_SOURCE 1
-#endif
-/* Enable general extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# define __EXTENSIONS__ 1
-#endif
-
-
-/* Version number of package */
-#define VERSION "1.0"
-
-/* Define to 1 if on MINIX. */
-/* #undef _MINIX */
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
- this defined. */
-/* #undef _POSIX_1_SOURCE */
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-/* #undef _POSIX_SOURCE */
View
81 deps/uv/src/unix/eio/config_freebsd.h
@@ -1,81 +0,0 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* fdatasync(2) is available */
-/* #undef HAVE_FDATASYNC */
-
-/* utimes(2) is available */
-#define HAVE_UTIMES 1
-
-/* futimes(2) is available */
-#define HAVE_FUTIMES 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* pread(2) and pwrite(2) are available */
-#define HAVE_PREADWRITE 1
-
-/* readahead(2) is available (linux) */
-/* #undef HAVE_READAHEAD */
-
-/* sendfile(2) is available and supported */
-#define HAVE_SENDFILE 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* sync_file_range(2) is available */
-/* #undef HAVE_SYNC_FILE_RANGE */
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR ".libs/"
-
-/* Name of package */
-#define PACKAGE "libeio"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-#define VERSION "1.0"
View
94 deps/uv/src/unix/eio/config_linux.h
@@ -1,94 +0,0 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-#include <linux/version.h>
-#include <features.h>
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* fdatasync(2) is available */
-#define HAVE_FDATASYNC 1
-
-/* utimes(2) is available */
-#define HAVE_UTIMES 1
-
-/* futimes(2) is available but we make the syscall directly. */
-#undef HAVE_FUTIMES
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* pread(2) and pwrite(2) are available */
-#define HAVE_PREADWRITE 1
-
-/* readahead(2) is available (linux) */
-#define HAVE_READAHEAD 1
-
-/* sendfile(2) is available and supported */
-#define HAVE_SENDFILE 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* sync_file_range(2) is available if kernel >= 2.6.17 and glibc >= 2.6 */
-#if LINUX_VERSION_CODE >= 0x020611 && __GLIBC_PREREQ(2, 6)
-#define HAVE_SYNC_FILE_RANGE 1
-#else
-#define HAVE_SYNC_FILE_RANGE 0
-#endif
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <sys/syscall.h> header file. */
-#define HAVE_SYS_SYSCALL_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR ".libs/"
-
-/* Name of package */
-#define PACKAGE "libeio"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-#define VERSION "1.0"
View
81 deps/uv/src/unix/eio/config_netbsd.h
@@ -1,81 +0,0 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* fdatasync(2) is available */
-/* #undef HAVE_FDATASYNC */
-
-/* utimes(2) is available */
-#define HAVE_UTIMES 1
-
-/* futimes(2) is available */
-#define HAVE_FUTIMES 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* pread(2) and pwrite(2) are available */
-#define HAVE_PREADWRITE 1
-
-/* readahead(2) is available (linux) */
-/* #undef HAVE_READAHEAD */
-
-/* sendfile(2) is available and supported */
-#define HAVE_SENDFILE 0
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* sync_file_range(2) is available */
-/* #undef HAVE_SYNC_FILE_RANGE */
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR ".libs/"
-
-/* Name of package */
-#define PACKAGE "libeio"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-#define VERSION "1.0"
View
137 deps/uv/src/unix/eio/config_openbsd.h
@@ -1,137 +0,0 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* fallocate(2) is available */
-/* #undef HAVE_FALLOCATE */
-
-/* fdatasync(2) is available */
-/* #undef HAVE_FDATASYNC */
-
-/* futimes(2) is available */
-#define HAVE_FUTIMES 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* posix_fadvise(2) is available */
-/* #undef HAVE_POSIX_FADVISE */
-
-/* posix_madvise(2) is available */
-#define HAVE_POSIX_MADVISE 1
-
-/* prctl(PR_SET_NAME) is available */
-/* #undef HAVE_PRCTL_SET_NAME */
-
-/* pread(2) and pwrite(2) are available */
-#define HAVE_PREADWRITE 1
-
-/* readahead(2) is available (linux) */
-/* #undef HAVE_READAHEAD */
-
-/* sendfile(2) is available and supported */
-/* #undef HAVE_SENDFILE */
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* sync_file_range(2) is available */
-/* #undef HAVE_SYNC_FILE_RANGE */
-
-/* Define to 1 if you have the <sys/prctl.h> header file. */
-/* #undef HAVE_SYS_PRCTL_H */
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* syscall(__NR_syncfs) is available */
-/* #undef HAVE_SYS_SYNCFS */
-
-/* Define to 1 if you have the <sys/syscall.h> header file. */
-#define HAVE_SYS_SYSCALL_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* utimes(2) is available */
-#define HAVE_UTIMES 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR ".libs/"
-
-/* Name of package */
-#define PACKAGE "libeio"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Enable extensions on AIX 3, Interix. */
-#ifndef _ALL_SOURCE
-# define _ALL_SOURCE 1
-#endif
-/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-/* Enable threading extensions on Solaris. */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# define _POSIX_PTHREAD_SEMANTICS 1
-#endif
-/* Enable extensions on HP NonStop. */
-#ifndef _TANDEM_SOURCE
-# define _TANDEM_SOURCE 1
-#endif
-/* Enable general extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# define __EXTENSIONS__ 1
-#endif
-
-
-/* Version number of package */
-#define VERSION "1.0"
-
-/* Define to 1 if on MINIX. */
-/* #undef _MINIX */
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
- this defined. */
-/* #undef _POSIX_1_SOURCE */
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-/* #undef _POSIX_SOURCE */
View
84 deps/uv/src/unix/eio/config_sunos.h
@@ -1,84 +0,0 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* fdatasync(2) is available */
-#define HAVE_FDATASYNC 1
-
-/* utimes(2) is available */
-#define HAVE_UTIMES 1
-
-/* futimes(2) is available */
-#define HAVE_FUTIMES 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* pread(2) and pwrite(2) are available */
-#define HAVE_PREADWRITE 1
-
-/* readahead(2) is available (linux) */
-/* #undef HAVE_READAHEAD */
-
-/* sendfile(2) is available and supported */
-/* #undef HAVE_SENDFILE */
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* sync_file_range(2) is available */
-/* #undef HAVE_SYNC_FILE_RANGE */
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR ".libs/"
-
-/* Name of package */
-#define PACKAGE "libeio"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-#define VERSION "1.0"
View
22 deps/uv/src/unix/eio/configure.ac
@@ -1,22 +0,0 @@
-AC_PREREQ(2.59)
-AC_INIT
-AC_CONFIG_SRCDIR([eio.h])
-AC_CONFIG_HEADERS([config.h])
-
-AM_INIT_AUTOMAKE(libeio,1.0)
-AM_MAINTAINER_MODE
-
-AC_GNU_SOURCE
-
-AC_PROG_LIBTOOL
-
-AC_PROG_CC
-
-if test "x$GCC" = xyes ; then
- CFLAGS="-O3 $CFLAGS"
-fi
-
-m4_include([libeio.m4])
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
View
194 deps/uv/src/unix/eio/demo.c
@@ -1,194 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <poll.h>
-#include <string.h>
-#include <assert.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "eio.h"
-
-int respipe [2];
-
-void
-want_poll (void)
-{
- char dummy;
- printf ("want_poll ()\n");
- write (respipe [1], &dummy, 1);
-}
-
-void
-done_poll (void)
-{
- char dummy;
- printf ("done_poll ()\n");
- read (respipe [0], &dummy, 1);
-}
-
-void
-event_loop (void)
-{
- // an event loop. yeah.
- struct pollfd pfd;
- pfd.fd = respipe [0];
- pfd.events = POLLIN;
-
- printf ("\nentering event loop\n");
- while (eio_nreqs ())
- {
- poll (&pfd, 1, -1);
- printf ("eio_poll () = %d\n", eio_poll ());
- }
- printf ("leaving event loop\n");
-}
-
-int