diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2012-10-30 23:06:03 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2012-11-01 01:22:16 +0100 |
commit | ab1e66d93f4eddf23f62fd69094690124357e3e9 (patch) | |
tree | 7c5cc31b101f713fc23e828751b9eef8be573f5e /deps/uv/src/uv-common.h | |
parent | a12c42ca2f8d5ce71c75cab334a53bd71bdaea09 (diff) | |
download | android-node-v8-ab1e66d93f4eddf23f62fd69094690124357e3e9.tar.gz android-node-v8-ab1e66d93f4eddf23f62fd69094690124357e3e9.tar.bz2 android-node-v8-ab1e66d93f4eddf23f62fd69094690124357e3e9.zip |
deps: upgrade libuv to 97c527a
Diffstat (limited to 'deps/uv/src/uv-common.h')
-rw-r--r-- | deps/uv/src/uv-common.h | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/deps/uv/src/uv-common.h b/deps/uv/src/uv-common.h index e9caed9af0..d4d1c8b277 100644 --- a/deps/uv/src/uv-common.h +++ b/deps/uv/src/uv-common.h @@ -29,7 +29,12 @@ #include <assert.h> #include <stddef.h> -#include <stdint.h> + +#if defined(_MSC_VER) && _MSC_VER < 1600 +# include "uv-private/stdint-msvc2008.h" +#else +# include <stdint.h> +#endif #include "uv.h" #include "tree.h" @@ -130,34 +135,44 @@ UNUSED static int uv__is_active(const uv_handle_t* h) { #define uv__is_active(h) uv__is_active((const uv_handle_t*)(h)) UNUSED static void uv__handle_start(uv_handle_t* h) { - if (h->flags & UV__HANDLE_ACTIVE) return; + assert(!(h->flags & UV__HANDLE_CLOSING)); + if (h->flags & UV__HANDLE_ACTIVE) + return; h->flags |= UV__HANDLE_ACTIVE; - if (h->flags & UV__HANDLE_CLOSING) return; - if (h->flags & UV__HANDLE_REF) uv__active_handle_add(h); + if (h->flags & UV__HANDLE_REF) + uv__active_handle_add(h); } #define uv__handle_start(h) uv__handle_start((uv_handle_t*)(h)) UNUSED static void uv__handle_stop(uv_handle_t* h) { - if (!(h->flags & UV__HANDLE_ACTIVE)) return; + assert(!(h->flags & UV__HANDLE_CLOSING)); + if (!(h->flags & UV__HANDLE_ACTIVE)) + return; h->flags &= ~UV__HANDLE_ACTIVE; - if (h->flags & UV__HANDLE_CLOSING) return; - if (h->flags & UV__HANDLE_REF) uv__active_handle_rm(h); + if (h->flags & UV__HANDLE_REF) + uv__active_handle_rm(h); } #define uv__handle_stop(h) uv__handle_stop((uv_handle_t*)(h)) UNUSED static void uv__handle_ref(uv_handle_t* h) { - if (h->flags & UV__HANDLE_REF) return; - if (h->flags & (UV__HANDLE_ACTIVE | UV__HANDLE_CLOSING)) - uv__active_handle_add(h); + if (h->flags & UV__HANDLE_REF) + return; h->flags |= UV__HANDLE_REF; + if (h->flags & UV__HANDLE_CLOSING) + return; + if (h->flags & UV__HANDLE_ACTIVE) + uv__active_handle_add(h); } #define uv__handle_ref(h) uv__handle_ref((uv_handle_t*)(h)) UNUSED static void uv__handle_unref(uv_handle_t* h) { - if (!(h->flags & UV__HANDLE_REF)) return; - if (h->flags & (UV__HANDLE_ACTIVE | UV__HANDLE_CLOSING)) - uv__active_handle_rm(h); + if (!(h->flags & UV__HANDLE_REF)) + return; h->flags &= ~UV__HANDLE_REF; + if (h->flags & UV__HANDLE_CLOSING) + return; + if (h->flags & UV__HANDLE_ACTIVE) + uv__active_handle_rm(h); } #define uv__handle_unref(h) uv__handle_unref((uv_handle_t*)(h)) |