22 #ifndef UV_WIN_HANDLE_INL_H_
23 #define UV_WIN_HANDLE_INL_H_
32 #define DECREASE_ACTIVE_COUNT(loop, handle) \
34 if (--(handle)->activecnt == 0 && \
35 !((handle)->flags & UV_HANDLE_CLOSING)) { \
36 uv__handle_stop((handle)); \
38 assert((handle)->activecnt >= 0); \
42 #define INCREASE_ACTIVE_COUNT(loop, handle) \
44 if ((handle)->activecnt++ == 0) { \
45 uv__handle_start((handle)); \
47 assert((handle)->activecnt > 0); \
51 #define DECREASE_PENDING_REQ_COUNT(handle) \
53 assert(handle->reqs_pending > 0); \
54 handle->reqs_pending--; \
56 if (handle->flags & UV_HANDLE_CLOSING && \
57 handle->reqs_pending == 0) { \
58 uv_want_endgame(loop, (uv_handle_t*)handle); \
63 #define uv__handle_closing(handle) \
65 assert(!((handle)->flags & UV_HANDLE_CLOSING)); \
67 if (!(((handle)->flags & UV_HANDLE_ACTIVE) && \
68 ((handle)->flags & UV_HANDLE_REF))) \
69 uv__active_handle_add((uv_handle_t*) (handle)); \
71 (handle)->flags |= UV_HANDLE_CLOSING; \
72 (handle)->flags &= ~UV_HANDLE_ACTIVE; \
76 #define uv__handle_close(handle) \
78 QUEUE_REMOVE(&(handle)->handle_queue); \
79 uv__active_handle_rm((uv_handle_t*) (handle)); \
81 (handle)->flags |= UV_HANDLE_CLOSED; \
83 if ((handle)->close_cb) \
84 (handle)->close_cb((uv_handle_t*) (handle)); \
101 while (
loop->endgame_handles) {
static mcore_handle handle
void uv_fs_event_endgame(uv_loop_t *loop, uv_fs_event_t *handle)
static INLINE void uv_process_endgames(uv_loop_t *loop)
static INLINE void uv_want_endgame(uv_loop_t *loop, uv_handle_t *handle)
static INLINE HANDLE uv__get_osfhandle(int fd)
#define uv__handle_close(handle)
assert(limit<=UINT32_MAX/2)
void uv_tcp_endgame(uv_loop_t *loop, uv_tcp_t *handle)
void uv_poll_endgame(uv_loop_t *loop, uv_poll_t *handle)
void uv_loop_watcher_endgame(uv_loop_t *loop, uv_handle_t *handle)
void uv_pipe_endgame(uv_loop_t *loop, uv_pipe_t *handle)
void uv_signal_endgame(uv_loop_t *loop, uv_signal_t *handle)
void uv__fs_poll_endgame(uv_loop_t *loop, uv_fs_poll_t *handle)
void uv_tty_endgame(uv_loop_t *loop, uv_tty_t *handle)
#define UV_BEGIN_DISABLE_CRT_ASSERT()
void uv_process_endgame(uv_loop_t *loop, uv_process_t *handle)
void uv_udp_endgame(uv_loop_t *loop, uv_udp_t *handle)
#define UV_END_DISABLE_CRT_ASSERT()
void uv__timer_close(uv_timer_t *handle)
@ UV_HANDLE_ENDGAME_QUEUED
void uv_async_endgame(uv_loop_t *loop, uv_async_t *handle)
static const z80_opcode fd[]