Lines Matching refs:handle
41 static void once_close_cb(uv_handle_t* handle) { in once_close_cb() argument
44 ASSERT_NOT_NULL(handle); in once_close_cb()
45 ASSERT_OK(uv_is_active(handle)); in once_close_cb()
51 static void once_cb(uv_timer_t* handle) { in once_cb() argument
54 ASSERT_NOT_NULL(handle); in once_cb()
55 ASSERT_OK(uv_is_active((uv_handle_t*) handle)); in once_cb()
59 uv_close((uv_handle_t*)handle, once_close_cb); in once_cb()
65 static void twice_close_cb(uv_handle_t* handle) { in twice_close_cb() argument
68 ASSERT_NOT_NULL(handle); in twice_close_cb()
69 ASSERT_OK(uv_is_active(handle)); in twice_close_cb()
74 static void twice_cb(uv_timer_t* handle) { in twice_cb() argument
77 ASSERT_NOT_NULL(handle); in twice_cb()
78 ASSERT_OK(uv_is_active((uv_handle_t*) handle)); in twice_cb()
82 uv_close((uv_handle_t*)handle, twice_close_cb); in twice_cb()
87 static void repeat_close_cb(uv_handle_t* handle) { in repeat_close_cb() argument
90 ASSERT_NOT_NULL(handle); in repeat_close_cb()
96 static void repeat_cb(uv_timer_t* handle) { in repeat_cb() argument
99 ASSERT_NOT_NULL(handle); in repeat_cb()
100 ASSERT_EQ(1, uv_is_active((uv_handle_t*) handle)); in repeat_cb()
105 uv_close((uv_handle_t*)handle, repeat_close_cb); in repeat_cb()
110 static void never_cb(uv_timer_t* handle) { in never_cb() argument
185 uv_timer_t handle; in TEST_IMPL() local
187 ASSERT_OK(uv_timer_init(uv_default_loop(), &handle)); in TEST_IMPL()
188 ASSERT_OK(uv_timer_get_repeat(&handle)); in TEST_IMPL()
189 ASSERT_UINT64_LE(0, uv_timer_get_due_in(&handle)); in TEST_IMPL()
190 ASSERT_OK(uv_is_active((uv_handle_t*) &handle)); in TEST_IMPL()
197 static void order_cb_a(uv_timer_t *handle) { in order_cb_a() argument
198 ASSERT_EQ(order_cb_called++, *(int*)handle->data); in order_cb_a()
202 static void order_cb_b(uv_timer_t *handle) { in order_cb_b() argument
203 ASSERT_EQ(order_cb_called++, *(int*)handle->data); in order_cb_b()
246 static void zero_timeout_cb(uv_timer_t* handle) { in zero_timeout_cb() argument
247 ASSERT_OK(uv_timer_start(handle, zero_timeout_cb, 0, 0)); in zero_timeout_cb()
248 uv_stop(handle->loop); in zero_timeout_cb()
271 static void tiny_timer_cb(uv_timer_t* handle) { in tiny_timer_cb() argument
272 ASSERT_PTR_EQ(handle, &tiny_timer); in tiny_timer_cb()
298 static void huge_repeat_cb(uv_timer_t* handle) { in huge_repeat_cb() argument
302 ASSERT_PTR_EQ(handle, &huge_timer1); in huge_repeat_cb()
304 ASSERT_PTR_EQ(handle, &tiny_timer); in huge_repeat_cb()
327 static void timer_run_once_timer_cb(uv_timer_t* handle) { in timer_run_once_timer_cb() argument
353 uv_timer_t handle; in TEST_IMPL() local
355 ASSERT_OK(uv_timer_init(uv_default_loop(), &handle)); in TEST_IMPL()
356 uv_close((uv_handle_t *)&handle, NULL); in TEST_IMPL()
358 ASSERT_EQ(UV_EINVAL, uv_timer_start(&handle, never_cb, 100, 100)); in TEST_IMPL()
366 uv_timer_t handle; in TEST_IMPL() local
368 ASSERT_OK(uv_timer_init(uv_default_loop(), &handle)); in TEST_IMPL()
369 ASSERT_EQ(UV_EINVAL, uv_timer_start(&handle, NULL, 100, 100)); in TEST_IMPL()
379 static void timer_early_check_cb(uv_timer_t* handle) { in timer_early_check_cb() argument
405 static void timer_check_double_call(uv_timer_t* handle) { in timer_check_double_call() argument