ns_client_request, ifp, accept_cb, ifp, 10,
NULL, NULL, &ifp->tcplistensocket));
ifp->flags |= NS_INTERFACEFLAG_LISTENING;
- isc_async_run(isc_loop_current(loopmgr), sendquery,
- ifp->tcplistensocket);
+ isc_async_current(loopmgr, sendquery, ifp->tcplistensocket);
return;
lock_and_dumpnode(dns_fixedname_name(&fname), node);
dns_db_detachnode(gdb, &node);
- isc_async_run(isc_loop_current(loopmgr), assignwork, NULL);
+ isc_async_current(loopmgr, assignwork, NULL);
}
/*%
done_update(void) {
ddebug("done_update()");
- isc_async_run(isc_loop_main(loopmgr), getinput, NULL);
+ isc_async_current(loopmgr, getinput, NULL);
}
static void
*\li 'cbarg' is passed to the 'cb' as the only argument, may be NULL
*/
+#define isc_async_current(loopmgr, cb, cbarg) \
+ isc_async_run(isc_loop_current(loopmgr), cb, cbarg)
+/*%<
+ * Helper macro to run the job on the current loop
+ */
+
ISC_LANG_ENDDECLS
assert_true(eresult == ISC_R_SUCCESS);
}
- isc_async_run(isc_loop_current(loopmgr), doh_connect_thread,
- connect_nm);
+ isc_async_current(loopmgr, doh_connect_thread, connect_nm);
}
if (sends <= 0) {
isc_loopmgr_shutdown(loopmgr);
static void
runjob(void *arg __attribute__((__unused__))) {
- isc_async_run(isc_loop_current(loopmgr), count, loopmgr);
+ isc_async_current(loopmgr, count, loopmgr);
if (isc_tid() == 0) {
- isc_async_run(isc_loop_current(loopmgr), shutdown_loopmgr,
- loopmgr);
+ isc_async_current(loopmgr, shutdown_loopmgr, loopmgr);
}
}
if (have_expected_cconnects(atomic_fetch_add(&cconnects, 1) + 1)) {
do_cconnects_shutdown(loopmgr);
} else if (do_send) {
- isc_async_run(isc_loop_current(loopmgr),
- stream_recv_send_connect,
- (cbarg == NULL ? get_stream_connect_function()
- : (stream_connect_function)cbarg));
+ isc_async_current(loopmgr, stream_recv_send_connect,
+ (cbarg == NULL
+ ? get_stream_connect_function()
+ : (stream_connect_function)cbarg));
}
isc_refcount_increment0(&active_creads);
connect_readcb = timeout_retry_cb;
isc_nm_settimeouts(connect_nm, T_SOFT, T_SOFT, T_SOFT, T_SOFT);
- isc_async_run(isc_loop_current(loopmgr), stream_recv_send_connect,
- tcpdns_connect);
+ isc_async_current(loopmgr, stream_recv_send_connect, tcpdns_connect);
}
ISC_LOOP_TEST_IMPL(tcpdns_recv_one) {
start_listening(ISC_NM_LISTEN_ONE, listen_accept_cb, listen_read_cb);
- isc_async_run(isc_loop_current(loopmgr), stream_recv_send_connect,
- tcpdns_connect);
+ isc_async_current(loopmgr, stream_recv_send_connect, tcpdns_connect);
}
ISC_LOOP_TEST_IMPL(tcpdns_recv_two) {
start_listening(ISC_NM_LISTEN_ONE, listen_accept_cb, listen_read_cb);
- isc_async_run(isc_loop_current(loopmgr), stream_recv_send_connect,
- tcpdns_connect);
+ isc_async_current(loopmgr, stream_recv_send_connect, tcpdns_connect);
- isc_async_run(isc_loop_current(loopmgr), stream_recv_send_connect,
- tcpdns_connect);
+ isc_async_current(loopmgr, stream_recv_send_connect, tcpdns_connect);
}
ISC_LOOP_TEST_IMPL(tcpdns_recv_send) {
ISC_LOOP_TEST_IMPL(udp_shutdown_connect) {
isc_loopmgr_shutdown(loopmgr);
isc_refcount_increment0(&active_cconnects);
- isc_async_run(isc_loop_current(loopmgr), udp_connect_udpconnect,
- netmgr);
+ isc_async_current(loopmgr, udp_connect_udpconnect, netmgr);
}
static void
{
do_cconnects_shutdown(loopmgr);
} else if (do_send) {
- isc_async_run(isc_loop_current(loopmgr), udp__connect,
- cbarg);
+ isc_async_current(loopmgr, udp__connect, cbarg);
}
isc_refcount_increment0(&active_creads);