Home
last modified time | relevance | path

Searched refs:timer (Results 1 - 25 of 43) sorted by relevance

12

/Couchbase_C_Client_v3.0/src/lcbio/
H A Dtimer.cc20 #include "timer-ng.h"
22 #define TMR_IS_DESTROYED(timer) ((timer)->state & LCBIO_TIMER_S_DESTROYED)
23 #define TMR_IS_ARMED(timer) ((timer)->state & LCBIO_TIMER_S_ARMED)
25 static void destroy_timer(lcbio_TIMER *timer) in destroy_timer() argument
27 if (timer->event) { in destroy_timer()
28 timer->io->timer.destroy(timer in destroy_timer()
36 auto *timer = static_cast<lcbio_TIMER *>(arg); timer_callback() local
67 lcbio_timer_destroy(lcbio_TIMER *timer) lcbio_timer_destroy() argument
77 lcbio_timer_disarm(lcbio_TIMER *timer) lcbio_timer_disarm() argument
87 lcbio_timer_rearm(lcbio_TIMER *timer, uint32_t usec) lcbio_timer_rearm() argument
98 lcbio_async_signal(lcbio_TIMER *timer) lcbio_async_signal() argument
103 lcbio_async_cancel(lcbio_TIMER *timer) lcbio_async_cancel() argument
108 lcbio_timer_dump(lcbio_TIMER *timer, FILE *fp) lcbio_timer_dump() argument
[all...]
H A Dtimer-ng.h29 * This file contains the timer routines. This provides a simpler interface
39 * The timer routines here allow for an asynchronous event to be scheduled
48 * A timer may be created via lcbio_timer_new(). The timer's initial state
52 * When a timer is armed, its callback (passed lcbio_timer_new()) will be
55 * To schedule a timer, use the lcbio_timer_rearm() to unconditionally schedule
57 * timer as soon as possible, once the event loop regains control.
59 * To cancel an armed timer (that is, to ensure the event is _not_ called), use
93 * @brief Creates a new timer object.
95 * The newly created timer wil
[all...]
H A Diotable.c168 fn(LCB_IOPROCS_VERSION, &table->loop, &table->timer, &table->u_io.v0.io, &table->u_io.v0.ev, in init_v23_table()
223 table->timer.create = io->v.v0.create_timer; in lcbio_table_new()
224 table->timer.destroy = io->v.v0.destroy_timer; in lcbio_table_new()
225 table->timer.cancel = io->v.v0.delete_timer; in lcbio_table_new()
226 table->timer.schedule = io->v.v0.update_timer; in lcbio_table_new()
/Couchbase_C_Client_v3.0/tests/iotests/
H A Dt_iops.cc47 void *ret = iot->timer.create(IOT_ARG(iot)); in createTimer()
52 void cancelTimer(void *timer) in cancelTimer() argument
54 iot->timer.cancel(IOT_ARG(iot), timer); in cancelTimer() local
57 void scheduleTimer(void *timer, TimerCallback cb, lcb_uint32_t us, void *arg) in scheduleTimer() argument
60 iot->timer.schedule(IOT_ARG(iot), timer, us, arg, cb); in scheduleTimer() local
63 void freeTimer(void *timer) in freeTimer() argument
65 iot->timer.destroy(IOT_ARG(iot), timer); in freeTimer() local
101 void *timer; global() member in TimerCountdown
[all...]
H A Dt_netfail.cc263 lcbio_pTIMER timer = lcbio_timer_new(instance->iotable, &ns, reschedule_callback); in TEST_F() local
265 lcbio_timer_rearm(timer, 900000); in TEST_F()
269 lcbio_timer_destroy(timer); in TEST_F()
315 lcbio_pTIMER timer = lcbio_timer_new(instance->iotable, &ns, reschedule_callback); in TEST_F() local
317 lcbio_timer_rearm(timer, 900000); in TEST_F()
321 lcbio_timer_destroy(timer); in TEST_F()
513 lcbio_pTIMER timer; in TEST_F() local
514 timer = lcbio_timer_new(instance->iotable, &ctx, fo_callback); in TEST_F()
516 lcbio_timer_rearm(timer, 500000); in TEST_F()
541 lcbio_timer_destroy(timer); in TEST_F()
[all...]
/Couchbase_C_Client_v3.0/plugins/io/iocp/
H A Diocp_timer.c68 void iocp_tmq_add(lcb_list_t *list, iocp_timer_t *timer) in iocp_tmq_add() argument
70 IOCP_LOG(IOCP_TRACE, "Adding timer %p with ms %lu", timer, timer->ms); in iocp_tmq_add()
71 lcb_list_add_sorted(list, &timer->list, iocp_timer_cmp_asc); in iocp_tmq_add()
74 void iocp_tmq_del(lcb_list_t *list, iocp_timer_t *timer) in iocp_tmq_del() argument
76 lcb_list_delete(&timer->list); in iocp_tmq_del()
77 IOCP_LOG(IOCP_TRACE, "Removing %p. Empty?=%d", timer, LCB_LIST_IS_EMPTY(list)); in iocp_tmq_del()
H A Diocp_loop.c198 iocp_timer_t *timer = iocp_tmq_pop(&io->timer_queue.list, now); in deque_expired_timers() local
200 if (!timer) { in deque_expired_timers()
204 timer->is_active = 0; in deque_expired_timers()
205 timer->cb(-1, 0, timer->arg); in deque_expired_timers()
H A Diocp_iops.h185 void iocp_tmq_add(lcb_list_t *list, iocp_timer_t *timer);
186 void iocp_tmq_del(lcb_list_t *list, iocp_timer_t *timer);
H A Diocp_iops.c386 static void get_procs(int version, lcb_loop_procs *loop, lcb_timer_procs *timer, lcb_bsd_procs *bsd, lcb_ev_procs *ev, in get_procs() argument
403 timer->create = create_timer; in get_procs()
404 timer->cancel = delete_timer; in get_procs()
405 timer->schedule = update_timer; in get_procs()
406 timer->destroy = destroy_timer; in get_procs()
/Couchbase_C_Client_v3.0/plugins/io/libuv/
H A Dplugin-libuv.c25 static void wire_iops2(int version, lcb_loop_procs *loop, lcb_timer_procs *timer, lcb_bsd_procs *bsd, lcb_ev_procs *ev,
509 my_timer_t *mytimer = (my_timer_t *)timer; in UVC_TIMER_CB()
518 my_timer_t *timer = (my_timer_t *)calloc(1, sizeof(*timer)); in create_timer() local
519 if (!timer) { in create_timer()
523 timer->parent = io; in create_timer()
525 uv_timer_init(io->loop, &timer->uvt); in create_timer()
527 return timer; in create_timer()
533 my_timer_t *timer = (my_timer_t *)timer_opaque; in update_timer() local
535 timer in update_timer()
545 my_timer_t *timer = (my_timer_t *)timer_opaque; delete_timer() local
555 my_timer_t *timer = (my_timer_t *)handle; timer_close_cb() local
628 wire_iops2(int version, lcb_loop_procs *loop, lcb_timer_procs *timer, lcb_bsd_procs *bsd, lcb_ev_procs *ev, lcb_completion_procs *iocp, lcb_iomodel_t *model) wire_iops2() argument
[all...]
/Couchbase_C_Client_v3.0/src/docreq/
H A Ddocreq.cc30 : instance(instance_), timer(lcbio_timer_new(instance->iotable, this, docreq_handler)) in Queue()
39 lcbio_timer_destroy(timer); in ~Queue()
62 lcbio_async_signal(q->timer); in docq_poke()
67 if (!lcbio_timer_armed(q->timer)) { in docq_poke()
68 lcbio_timer_rearm(q->timer, DOCQ_DELAY_US); in docq_poke()
94 lcbio_timer_rearm(q->timer, DOCQ_DELAY_US); in docreq_handler()
/Couchbase_C_Client_v3.0/src/ssl/
H A Dssl_common.c63 return xs->orig->timer.create(IOT_ARG(xs->orig)); in create_timer()
65 static int schedule_timer(lcb_io_opt_t io, void *timer, lcb_uint32_t us, void *arg, lcb_ioE_callback callback) in schedule_timer() argument
68 return xs->orig->timer.schedule(IOT_ARG(xs->orig), timer, us, arg, callback); in schedule_timer()
70 static void destroy_timer(lcb_io_opt_t io, void *timer) in destroy_timer() argument
73 xs->orig->timer.destroy(IOT_ARG(xs->orig), timer); in destroy_timer()
75 static void cancel_timer(lcb_io_opt_t io, void *timer) in cancel_timer() argument
78 xs->orig->timer.cancel(IOT_ARG(xs->orig), timer); in cancel_timer()
[all...]
/Couchbase_C_Client_v3.0/src/operations/
H A Ddurability.cc395 is_durstore(false), cookie(NULL), ns_timeout(0), timer(NULL), instance(instance_), span(NULL) in Durset()
418 timer = io->timer.create(io->p); in Durset()
473 if (timer) { in ~Durset()
475 io->timer.cancel(io->p, timer); in ~Durset()
476 io->timer.destroy(io->p, timer); in ~Durset()
477 timer = NULL; in ~Durset()
567 io->timer in switch_state()
[all...]
/Couchbase_C_Client_v3.0/plugins/io/libev/
H A Dplugin-libev.c45 struct ev_timer timer; member
67 static void timer_thunk(struct ev_loop *loop, ev_timer *timer, int events) in timer_thunk() argument
69 struct libev_event *evt = (struct libev_event *)timer; in timer_thunk()
126 static int lcb_io_update_timer(struct lcb_io_opt_st *iops, void *timer, lcb_uint32_t usec, void *cb_data, in lcb_io_update_timer() argument
130 struct libev_event *evt = timer; in lcb_io_update_timer()
135 ev_timer_stop(io_cookie->loop, &evt->ev.timer); in lcb_io_update_timer()
136 ev_timer_init(&evt->ev.timer, timer_thunk, start, 0); in lcb_io_update_timer()
137 ev_timer_start(io_cookie->loop, &evt->ev.timer); in lcb_io_update_timer()
145 ev_timer_stop(io_cookie->loop, &evt->ev.timer); in lcb_io_delete_timer()
/Couchbase_C_Client_v3.0/src/bucketconfig/
H A Dbc_cccp.cc29 #include <lcbio/timer-cxx.h>
94 lcb::io::Timer<CccpProvider, &CccpProvider::on_timeout> timer; member
156 timer.cancel(); in schedule_next_request()
166 timer.rearm(settings().config_node_timeout); in schedule_next_request()
193 timer.cancel(); in mcio_error()
261 cccp->timer.cancel(); in cccp_update()
325 timer.cancel(); in pause()
337 timer.release(); in ~CccpProvider()
434 timer.cancel(); in on_io_read()
449 timer in request_config()
[all...]
H A Dbc_file.cc21 #include <lcbio/timer-cxx.h>
60 lcb::io::Timer<FileProvider, &FileProvider::reload_cache> timer; member
188 if (!timer.is_armed()) { in refresh()
189 timer.signal(); in refresh()
196 timer.release(); in ~FileProvider()
232 timer(parent_->iot, this) in FileProvider()
/Couchbase_C_Client_v3.0/example/libuvdirect/
H A Dmain.c42 uv_timer_t timer; variable
51 uv_timer_stop(&timer); in delete_timer()
52 uv_close((uv_handle_t *)&timer, timer_close_cb); in delete_timer()
155 timer.data = instance; in schedule_timer()
156 uv_timer_start(&timer, timer_callback, interval, 0); in schedule_timer()
174 uv_timer_init(evbase, &timer); in store_callback()
/Couchbase_C_Client_v3.0/plugins/io/libevent/
H A Dplugin-libevent.c124 static int lcb_io_update_timer(struct lcb_io_opt_st *iops, void *timer, lcb_uint32_t usec, void *cb_data, in lcb_io_update_timer() argument
129 if (flags == event_get_events(timer) && handler == event_get_callback(timer)) { in lcb_io_update_timer()
134 if (event_pending(timer, EV_TIMEOUT, 0)) { in lcb_io_update_timer()
135 event_del(timer); in lcb_io_update_timer()
138 event_assign(timer, ((struct libevent_cookie *)iops->v.v2.cookie)->base, -1, flags, handler, cb_data); in lcb_io_update_timer()
141 return event_add(timer, &tmo); in lcb_io_update_timer()
/Couchbase_C_Client_v3.0/example/libeventdirect/
H A Dmain.c40 struct event *timer = NULL; variable
115 evtimer_add(timer, &tv); in schedule_timer()
132 timer = evtimer_new(evbase, timer_callback, instance); in store_callback()
217 if (timer) { in main()
218 evtimer_del(timer); in main()
/Couchbase_C_Client_v3.0/tests/mocksupport/
H A Dtimeout.c50 struct itimerval timer = {.it_value = {.tv_sec = duration}}; in setup_test_timeout_handler() local
51 setitimer(ITIMER_REAL, &timer, NULL); in setup_test_timeout_handler()
/Couchbase_C_Client_v3.0/src/http/
H A Dhttp_io.cc132 /** Delay the timer */ in io_read()
133 lcbio_timer_rearm(req->timer, req->timeout()); in io_read()
277 if (!timer) { in start_io()
278 timer = lcbio_timer_new(io, this, request_timed_out); in start_io()
281 if (!lcbio_timer_armed(timer)) { in start_io()
282 lcbio_timer_rearm(timer, timeout()); in start_io()
H A Dhttp-priv.h23 #include <lcbio/timer-ng.h>
24 #include <lcbio/timer-cxx.h>
331 lcbio_pTIMER timer; member
/Couchbase_C_Client_v3.0/tests/socktests/
H A Dsocktest.cc263 timer = lcbio_timer_new(iot, this, timerCallback); in Timer()
273 lcbio_timer_destroy(timer); in destroy()
274 timer = NULL; in destroy()
279 lcbio_timer_disarm(timer); in cancel()
284 lcbio_timer_rearm(timer, LCB_MS2US(ms)); in schedule()
/Couchbase_C_Client_v3.0/plugins/io/select/
H A Dplugin-select.c114 static void sel_timer_cancel(lcb_io_opt_t iops, void *timer) in sel_timer_cancel() argument
116 sel_TIMER *tm = timer; in sel_timer_cancel()
124 static void sel_timer_free(lcb_io_opt_t iops, void *timer) in sel_timer_free() argument
126 sel_timer_cancel(iops, timer); in sel_timer_free()
127 free(timer); in sel_timer_free()
131 static int sel_timer_schedule(lcb_io_opt_t iops, void *timer, lcb_U32 usec, void *cb_data, lcb_ioE_callback handler) in sel_timer_schedule() argument
133 sel_TIMER *tm = timer; in sel_timer_schedule()
/Couchbase_C_Client_v3.0/src/
H A Dretryq.h22 #include <lcbio/timer-ng.h>
56 * @param table used to create the timer
167 lcbio_pTIMER timer; member in lcb::RetryQueue

Completed in 59 milliseconds

12