Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Jan 10, 2013
  1. @bnoordhuis

    unix: omit second fcntl() call if possible

    bnoordhuis authored
    Omit the fcntl() syscall when the O_NONBLOCK or FD_CLOEXEC is already
    set/clear because it's a no-op in that case.
Commits on Jan 9, 2013
  1. @bnoordhuis
Commits on Jan 8, 2013
  1. @tfeb @bnoordhuis

    linux: ensure that all CPUs have model information

    tfeb authored bnoordhuis committed
  2. @bennoleslie @bnoordhuis

    unix: improve uv_guess_handle() implementation

    bennoleslie authored bnoordhuis committed
    uv_guess_handle is currently squelching both fifo and all
    sockets on to the UV_NAMED_PIPE type. Rather than treating
    all sockets as UV_NAMED_PIPE, use getsockopt() and
    getsockaddr() to determine if the socket is an AF_UNIX
    stream (in which case return UV_NAMED_PIPE), or an AF_INET
    stream (in which case return UV_TCP), or an AF_INET datagram
    socket (in which case return UV_UDP).
    Additionally, currently all other file descriptor types are
    squelched to the UV_FILE type. Instead, only file descriptors
    that are marked as regular files are treated as UV_FILE. All
    other types (such as directories, character and block devices)
    are now treated as UV_UNKNOWN_HANDLE.
Commits on Jan 7, 2013
  1. @bnoordhuis

    unix: fix GNU-ism introduced in edd1007

    bnoordhuis authored
    Don't use features.h, it's only available on GNU/glibc systems.
Commits on Jan 6, 2013
  1. @bnoordhuis

    test: fix #if defined checks

    bnoordhuis authored
    Same as edd1007 but this time for the tests.
  2. @bnoordhuis

    test: simplify tcp_ref2b

    bnoordhuis authored
    Said test doesn't need its own close callback, it can piggyback on the
    common close callback.
  3. @bnoordhuis
  4. @bnoordhuis

    test, bench: make functions/variables static

    bnoordhuis authored
    Make functions and variables that are local to the compilation unit
    static. Remove what turns out to be unused.
  5. @bnoordhuis

    test, bench: ANSI-fy function prototypes

    bnoordhuis authored
    Replace `void f()` with `void f(void)`; the former means "a function
    that takes any number of arguments, including none" while the latter
    is what is actually intended: a function taking no arguments.
    The first form also isn't strictly conforming ANSI/ISO C.
  6. @bnoordhuis

    linux: fix race in uv_resident_set_memory()

    bnoordhuis authored
    uv_resident_set_memory() used a global buffer to read data into, which
    is a decidedly unsafe thing to do in a multi-threaded environment.
  7. @bnoordhuis
  8. @bnoordhuis

    unix: fix up #if defined checks

    bnoordhuis authored
    `#if FOO` (where FOO is undefined) is a legal construct in C89 and C99
    but gcc, clang and sparse complain loudly about it at higher warning
    Squelch those warnings. Makes the code more consistent as well.
  9. @bnoordhuis
  10. @bnoordhuis
  11. @bnoordhuis
  12. @bnoordhuis
  13. @bnoordhuis
  14. @bnoordhuis
  15. @bnoordhuis

    test: remove consumer_producer test

    bnoordhuis authored
    It fails intermittently on Travis for no other reason than that Travis
    is occasionally slow. Reduce the number of false positives, remove the
  16. @bnoordhuis

    unix: update loop->time after poll

    bnoordhuis authored
    Fixes a bug where timers expire prematurely when the following
    conditions hold:
      a) libuv first spends some time blocked in the platform poll function
      b) a callback then calls uv_timer_start()
    Cause: uv_timer_start() uses an out-of-date loop->time in its
    'when should the timer callback run?' calculations.
    Solution: Update loop->time before invoking any callbacks.
    Fixes #678.
  17. @bnoordhuis

    unix: use uv__hrtime() internally

    bnoordhuis authored
    This commit renames the various uv_hrtime() implementations to uv__hrtime().
    Libuv uses the high-res timer internally in performance-critical code paths.
    Calling the non-public version avoids going through the PLT when libuv is
    compiled as a shared object.
    The exported uv_hrtime() now has a single definition in src/unix/core.c that
    calls uv__hrtime().
    A future optimization is to lift the uv__hrtime() declarations into header
    files so they can be inlined at the call sites. Then again, linking with -flto
    should accomplish the same thing.
Commits on Jan 4, 2013
  1. @indutny

    stream: fix infinite select() polling on osx

    indutny authored
    Interruption FD buffer should be emptied after write, otherwise select()
    loop will poll indefinitely.
Commits on Jan 2, 2013
  1. @bnoordhuis

    unix: remove stale closing check in uv__write()

    bnoordhuis authored
    Introduced in 0db3274 but no longer necessary; uv__write() no longer
    runs when the handle has been closed. Write callbacks receive a special
    status code that informs them that the handle has been closed.
  2. @bnoordhuis
  3. @bnoordhuis
Commits on Dec 28, 2012
  1. @bnoordhuis
  2. @bnoordhuis

    unix: ensure done_cb gets called after uv_cancel()

    bnoordhuis authored
    Wake up the event loop with uv_async_send() when a request is cancelled.
    Ensures the done_cb is run on the next tick of the event loop.
    Not sending a wakeup signal results in the done_cb not getting called until
    another request completes, which may be a long time coming when it's the only
    request in the queue or when other requests are executing long-running jobs.
    Fixes #669.
  3. @saghul @bnoordhuis

    unix: reset errno when using sendfile emulation

    saghul authored bnoordhuis committed
    A common way to check if a uv_fs_t request failed is to check that
    req->errorno != 0.
    With uv_fs_sendfile(), when the sendfile() syscall fails, req->errorno is set
    to (for example) ENOTSOCK, even when the emulation code path succeeds.
    Zero errno before the call to uv__fs_sendfile_emul() to prevent that from
  4. @bnoordhuis
Commits on Dec 25, 2012
  1. @bnoordhuis
Commits on Dec 24, 2012
  1. @bnoordhuis

    build: export _DARWIN_C_SOURCE to dependents

    bnoordhuis authored
    Exporting just _POSIX_C_SOURCE=200112 hides SysV / BSD definitions like
    S_IREAD and S_IWRITE. Exporting _DARWIN_C_SOURCE fixes that.
    Issue reported by Travis Tilley.
  2. @saghul @bnoordhuis

    unix: don't run loop when all handles are unref'd

    saghul authored bnoordhuis committed
  3. @saghul @bnoordhuis

    prepare/idle/check: don't allow NULL callback

    saghul authored bnoordhuis committed
  4. @bnoordhuis
Something went wrong with that request. Please try again.