unix: add uv__is_closing() macro
This commit is contained in:
parent
b38c9c1004
commit
8e16f8e056
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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); \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user