unix: add uv__is_closing() macro

This commit is contained in:
Ben Noordhuis 2013-05-26 23:02:17 +02:00
parent b38c9c1004
commit 8e16f8e056
2 changed files with 4 additions and 1 deletions

View File

@ -225,7 +225,7 @@ static void uv__run_closing_handles(uv_loop_t* loop) {
int uv_is_closing(const uv_handle_t* handle) {
return handle->flags & (UV_CLOSING | UV_CLOSED);
return uv__is_closing(handle);
}

View File

@ -149,6 +149,9 @@ void uv__fs_poll_close(uv_fs_poll_t* handle);
#define uv__is_active(h) \
(((h)->flags & UV__HANDLE_ACTIVE) != 0)
#define uv__is_closing(h) \
(((h)->flags & (UV_CLOSING | UV_CLOSED)) != 0)
#define uv__handle_start(h) \
do { \
assert(((h)->flags & UV__HANDLE_CLOSING) == 0); \