Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions iocore/cache/P_CacheHosting.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,7 @@ struct CacheHostTableConfig;
typedef int (CacheHostTableConfig::*CacheHostTabHandler)(int, void *);
struct CacheHostTableConfig : public Continuation {
CacheHostTable **ppt;
CacheHostTableConfig(CacheHostTable **appt) : Continuation(nullptr), ppt(appt)
{
SET_HANDLER((CacheHostTabHandler)&CacheHostTableConfig::mainEvent);
}
CacheHostTableConfig(CacheHostTable **appt) : Continuation(nullptr), ppt(appt) { SET_HANDLER(&CacheHostTableConfig::mainEvent); }

int
mainEvent(int event, Event *e)
Expand Down
8 changes: 4 additions & 4 deletions iocore/dns/DNS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ DNSEntry::init(DNSQueryData target, int qtype_arg, Continuation *acont, DNSProce
}
}

SET_HANDLER((DNSEntryHandler)&DNSEntry::mainEvent);
SET_HANDLER(&DNSEntry::mainEvent);
}

/**
Expand Down Expand Up @@ -1240,7 +1240,7 @@ DNSEntry::delayEvent(int event, Event *e)
{
(void)event;
if (dnsProcessor.handler) {
SET_HANDLER((DNSEntryHandler)&DNSEntry::mainEvent);
SET_HANDLER(&DNSEntry::mainEvent);
return handleEvent(EVENT_IMMEDIATE, e);
}
e->schedule_in(DNS_DELAY_PERIOD);
Expand All @@ -1261,7 +1261,7 @@ DNSEntry::mainEvent(int event, Event *e)
}
if (!dnsH) {
Debug("dns", "handler not found, retrying...");
SET_HANDLER((DNSEntryHandler)&DNSEntry::delayEvent);
SET_HANDLER(&DNSEntry::delayEvent);
return handleEvent(event, e);
}

Expand Down Expand Up @@ -1995,7 +1995,7 @@ struct DNSRegressionContinuation : public Continuation {
i(0),
test(t)
{
SET_HANDLER((DNSRegContHandler)&DNSRegressionContinuation::mainEvent);
SET_HANDLER(&DNSRegressionContinuation::mainEvent);
}
};

Expand Down
5 changes: 1 addition & 4 deletions iocore/eventsystem/P_Freer.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ struct FreerContinuation : public Continuation {
return EVENT_DONE;
}

explicit FreerContinuation(void *ap) : Continuation(nullptr), p(ap)
{
SET_HANDLER((FreerContHandler)&FreerContinuation::dieEvent);
}
explicit FreerContinuation(void *ap) : Continuation(nullptr), p(ap) { SET_HANDLER(&FreerContinuation::dieEvent); }
};

TS_INLINE void
Expand Down
18 changes: 9 additions & 9 deletions iocore/hostdb/HostDB.cc
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ HostDBProcessor::start(int, size_t)
hostdb_current_timestamp = ts_clock::now();

HostDBContinuation *b = hostDBContAllocator.alloc();
SET_CONTINUATION_HANDLER(b, (HostDBContHandler)&HostDBContinuation::backgroundEvent);
SET_CONTINUATION_HANDLER(b, &HostDBContinuation::backgroundEvent);
b->mutex = new_ProxyMutex();
b->updateHostFileConfig();
eventProcessor.schedule_every(b, HRTIME_SECONDS(1), ET_DNS);
Expand Down Expand Up @@ -765,7 +765,7 @@ HostDBProcessor::getby(Continuation *cont, cb_process_result_pfn cb_process_resu
copt.cont = cont;
copt.host_res_style = (hash.db_mark == HOSTDB_MARK_SRV) ? HOST_RES_NONE : opt.host_res_style;
c->init(hash, copt);
SET_CONTINUATION_HANDLER(c, (HostDBContHandler)&HostDBContinuation::probeEvent);
SET_CONTINUATION_HANDLER(c, &HostDBContinuation::probeEvent);

thread->schedule_in(c, MUTEX_RETRY_DELAY);

Expand Down Expand Up @@ -886,7 +886,7 @@ HostDBProcessor::iterate(Continuation *cont)
copt.host_res_style = HOST_RES_NONE;
c->init(HostDBHash(), copt);
c->current_iterate_pos = 0;
SET_CONTINUATION_HANDLER(c, (HostDBContHandler)&HostDBContinuation::iterateEvent);
SET_CONTINUATION_HANDLER(c, &HostDBContinuation::iterateEvent);

thread->schedule_in(c, HOST_DB_RETRY_PERIOD);

Expand Down Expand Up @@ -986,7 +986,7 @@ HostDBContinuation::dnsPendingEvent(int event, Event *e)
hostdb_cont_free(this);
return EVENT_DONE;
} else {
SET_HANDLER((HostDBContHandler)&HostDBContinuation::probeEvent);
SET_HANDLER(&HostDBContinuation::probeEvent);
return probeEvent(EVENT_INTERVAL, nullptr);
}
}
Expand Down Expand Up @@ -1168,7 +1168,7 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e)
// Check for IP family failover
if (failed && check_for_retry(hash.db_mark, host_res_style)) {
this->refresh_hash(); // family changed if we're doing a retry.
SET_CONTINUATION_HANDLER(this, (HostDBContHandler)&HostDBContinuation::probeEvent);
SET_CONTINUATION_HANDLER(this, &HostDBContinuation::probeEvent);
thread->schedule_in(this, MUTEX_RETRY_DELAY);
return EVENT_CONT;
}
Expand All @@ -1190,7 +1190,7 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e)
}

if (need_to_reschedule) {
SET_HANDLER((HostDBContHandler)&HostDBContinuation::probeEvent);
SET_HANDLER(&HostDBContinuation::probeEvent);
// Will reschedule on affinity thread or current thread
timeout = eventProcessor.schedule_in(this, HOST_DB_RETRY_PERIOD);
return EVENT_CONT;
Expand Down Expand Up @@ -1434,7 +1434,7 @@ HostDBContinuation::do_dns()
DNSProcessor::Options opt;
opt.timeout = dns_lookup_timeout;
opt.host_res_style = host_res_style_for(hash.db_mark);
SET_HANDLER((HostDBContHandler)&HostDBContinuation::dnsEvent);
SET_HANDLER(&HostDBContinuation::dnsEvent);
if (is_byname()) {
if (hash.dns_server) {
opt.handler = hash.dns_server->x_dnsH;
Expand All @@ -1449,7 +1449,7 @@ HostDBContinuation::do_dns()
pending_action = dnsProcessor.gethostbyaddr(this, &hash.ip, opt);
}
} else {
SET_HANDLER((HostDBContHandler)&HostDBContinuation::dnsPendingEvent);
SET_HANDLER(&HostDBContinuation::dnsPendingEvent);
}
}

Expand Down Expand Up @@ -1877,7 +1877,7 @@ struct HostDBTestReverse : public Continuation {
HostDBTestReverse(RegressionTest *t, int atype, int *astatus)
: Continuation(new_ProxyMutex()), test(t), type(atype), status(astatus)
{
SET_HANDLER((HostDBTestReverseHandler)&HostDBTestReverse::mainEvent);
SET_HANDLER(&HostDBTestReverse::mainEvent);
randu.seed(std::chrono::system_clock::now().time_since_epoch().count());
}
};
Expand Down
2 changes: 1 addition & 1 deletion iocore/hostdb/P_HostDBProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ struct HostDBContinuation : public Continuation {
{
ink_zero(hash_host_name_store);
ink_zero(hash.hash);
SET_HANDLER((HostDBContHandler)&HostDBContinuation::probeEvent);
SET_HANDLER(&HostDBContinuation::probeEvent);
}
};

Expand Down
18 changes: 9 additions & 9 deletions iocore/net/QUICNetVConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ void
QUICNetVConnection::init(QUICVersion version, QUICConnectionId peer_cid, QUICConnectionId original_cid, UDPConnection *udp_con,
QUICPacketHandler *packet_handler, QUICResetTokenTable *rtable)
{
SET_HANDLER((NetVConnHandler)&QUICNetVConnection::startEvent);
SET_HANDLER(&QUICNetVConnection::startEvent);
this->_initial_version = version;
this->_udp_con = udp_con;
this->_packet_handler = packet_handler;
Expand All @@ -266,7 +266,7 @@ QUICNetVConnection::init(QUICVersion version, QUICConnectionId peer_cid, QUICCon
QUICConnectionId retry_cid, UDPConnection *udp_con, QUICPacketHandler *packet_handler,
QUICResetTokenTable *rtable, QUICConnectionTable *ctable)
{
SET_HANDLER((NetVConnHandler)&QUICNetVConnection::acceptEvent);
SET_HANDLER(&QUICNetVConnection::acceptEvent);
this->_initial_version = version;
this->_udp_con = udp_con;
this->_packet_handler = packet_handler;
Expand Down Expand Up @@ -365,7 +365,7 @@ QUICNetVConnection::acceptEvent(int event, Event *e)
this->read.enabled = 1;

// Handshake callback handler.
SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_pre_handshake);
SET_HANDLER(&QUICNetVConnection::state_pre_handshake);

// Send this netvc to InactivityCop.
nh->startCop(this);
Expand Down Expand Up @@ -575,7 +575,7 @@ QUICNetVConnection::connectUp(EThread *t, int fd)
this->thread = this_ethread();
ink_assert(nh->mutex->thread_holding == this->thread);

SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_pre_handshake);
SET_HANDLER(&QUICNetVConnection::state_pre_handshake);

if ((res = nh->startIO(this)) < 0) {
// FIXME: startIO only return 0 now! what should we do if it failed ?
Expand Down Expand Up @@ -2137,7 +2137,7 @@ void
QUICNetVConnection::_switch_to_handshake_state()
{
QUICConDebug("Enter state_handshake");
SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_handshake);
SET_HANDLER(&QUICNetVConnection::state_handshake);
}

void
Expand All @@ -2148,7 +2148,7 @@ QUICNetVConnection::_switch_to_established_state()
QUICConDebug("Negotiated cipher suite: %s", this->_handshake_handler->negotiated_cipher_suite());
this->_record_tls_handshake_end_time();

SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_connection_established);
SET_HANDLER(&QUICNetVConnection::state_connection_established);

std::shared_ptr<const QUICTransportParameters> remote_tp = this->_handshake_handler->remote_transport_parameters();
std::shared_ptr<const QUICTransportParameters> local_tp = this->_handshake_handler->local_transport_parameters();
Expand Down Expand Up @@ -2200,7 +2200,7 @@ QUICNetVConnection::_switch_to_closing_state(QUICConnectionErrorUPtr error)
ink_hrtime rto = this->_rtt_measure.current_pto_period();

QUICConDebug("Enter state_connection_closing");
SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_connection_closing);
SET_HANDLER(&QUICNetVConnection::state_connection_closing);

// This states SHOULD persist for three times the
// current Retransmission Timeout (RTO) interval as defined in
Expand Down Expand Up @@ -2228,7 +2228,7 @@ QUICNetVConnection::_switch_to_draining_state(QUICConnectionErrorUPtr error)
ink_hrtime rto = this->_rtt_measure.current_pto_period();

QUICConDebug("Enter state_connection_draining");
SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_connection_draining);
SET_HANDLER(&QUICNetVConnection::state_connection_draining);

// This states SHOULD persist for three times the
// current Retransmission Timeout (RTO) interval as defined in
Expand All @@ -2246,7 +2246,7 @@ QUICNetVConnection::_switch_to_close_state()
QUICConDebug("Switching state without handshake completion");
}
QUICConDebug("Enter state_connection_closed");
SET_HANDLER((NetVConnHandler)&QUICNetVConnection::state_connection_closed);
SET_HANDLER(&QUICNetVConnection::state_connection_closed);
this->_schedule_closed_event();
}

Expand Down
2 changes: 1 addition & 1 deletion iocore/net/SSLNetVConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ SSLNetVConnection::free(EThread *t)
#endif

clear();
SET_CONTINUATION_HANDLER(this, (SSLNetVConnHandler)&SSLNetVConnection::startEvent);
SET_CONTINUATION_HANDLER(this, &SSLNetVConnection::startEvent);
ink_assert(con.fd == NO_FD);
ink_assert(t == this_ethread());

Expand Down
2 changes: 1 addition & 1 deletion iocore/net/Socks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ SocksEntry::startEvent(int event, void *data)
auth_handler = &socks5BasicAuthHandler;
}

SET_HANDLER((SocksEntryHandler)&SocksEntry::mainEvent);
SET_HANDLER(&SocksEntry::mainEvent);
mainEvent(NET_EVENT_OPEN, data);
} else {
if (timeout) {
Expand Down
2 changes: 1 addition & 1 deletion iocore/net/UnixNet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ initialize_thread_for_net(EThread *thread)

NetHandler::NetHandler() : Continuation(nullptr)
{
SET_HANDLER((NetContHandler)&NetHandler::mainNetEvent);
SET_HANDLER(&NetHandler::mainNetEvent);
}

int
Expand Down
14 changes: 7 additions & 7 deletions iocore/net/UnixNetAccept.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ net_accept(NetAccept *na, void *ep, bool blockable)
vc->read.triggered = 1;
}
#endif
SET_CONTINUATION_HANDLER(vc, (NetVConnHandler)&UnixNetVConnection::acceptEvent);
SET_CONTINUATION_HANDLER(vc, &UnixNetVConnection::acceptEvent);

EThread *t;
NetHandler *h;
Expand Down Expand Up @@ -193,7 +193,7 @@ NetAccept::init_accept(EThread *t)
return;
}

SET_HANDLER((NetAcceptHandler)&NetAccept::acceptEvent);
SET_HANDLER(&NetAccept::acceptEvent);
period = -HRTIME_MSECONDS(net_accept_period);
t->schedule_every(this, period);
}
Expand All @@ -212,9 +212,9 @@ NetAccept::accept_per_thread(int event, void *ep)
}

if (accept_fn == net_accept) {
SET_HANDLER((NetAcceptHandler)&NetAccept::acceptFastEvent);
SET_HANDLER(&NetAccept::acceptFastEvent);
} else {
SET_HANDLER((NetAcceptHandler)&NetAccept::acceptEvent);
SET_HANDLER(&NetAccept::acceptEvent);
}
PollDescriptor *pd = get_PollDescriptor(this_ethread());
if (this->ep.start(pd, this, EVENTIO_READ) < 0) {
Expand All @@ -240,7 +240,7 @@ NetAccept::init_accept_per_thread()
}
}

SET_HANDLER((NetAcceptHandler)&NetAccept::accept_per_thread);
SET_HANDLER(&NetAccept::accept_per_thread);
n = eventProcessor.thread_group[opt.etype]._count;

for (i = 0; i < n; i++) {
Expand Down Expand Up @@ -365,7 +365,7 @@ NetAccept::do_blocking_accept(EThread *t)
vc->read.triggered = 1;
}
#endif
SET_CONTINUATION_HANDLER(vc, (NetVConnHandler)&UnixNetVConnection::acceptEvent);
SET_CONTINUATION_HANDLER(vc, &UnixNetVConnection::acceptEvent);

EThread *localt = eventProcessor.assign_thread(opt.etype);
NetHandler *h = get_NetHandler(localt);
Expand Down Expand Up @@ -518,7 +518,7 @@ NetAccept::acceptFastEvent(int event, void *ep)
vc->read.triggered = 1;
}
#endif
SET_CONTINUATION_HANDLER(vc, (NetVConnHandler)&UnixNetVConnection::acceptEvent);
SET_CONTINUATION_HANDLER(vc, &UnixNetVConnection::acceptEvent);

EThread *t = e->ethread;
NetHandler *h = get_NetHandler(t);
Expand Down
6 changes: 3 additions & 3 deletions iocore/net/UnixNetVConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ UnixNetVConnection::reenable_re(VIO *vio)

UnixNetVConnection::UnixNetVConnection()
{
SET_HANDLER((NetVConnHandler)&UnixNetVConnection::startEvent);
SET_HANDLER(&UnixNetVConnection::startEvent);
}

// Private methods
Expand Down Expand Up @@ -1027,7 +1027,7 @@ UnixNetVConnection::acceptEvent(int event, Event *e)
SCOPED_MUTEX_LOCK(lock2, mutex, t);

// Setup a timeout callback handler.
SET_HANDLER((NetVConnHandler)&UnixNetVConnection::mainEvent);
SET_HANDLER(&UnixNetVConnection::mainEvent);

// Send this netvc to InactivityCop.
nh->startCop(this);
Expand Down Expand Up @@ -1298,7 +1298,7 @@ UnixNetVConnection::free(EThread *t)
con.close();

clear();
SET_CONTINUATION_HANDLER(this, (NetVConnHandler)&UnixNetVConnection::startEvent);
SET_CONTINUATION_HANDLER(this, &UnixNetVConnection::startEvent);
ink_assert(con.fd == NO_FD);
ink_assert(t == this_ethread());

Expand Down
4 changes: 2 additions & 2 deletions iocore/net/UnixUDPNet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1035,14 +1035,14 @@ UDPNetHandler::UDPNetHandler()
{
nextCheck = Thread::get_hrtime_updated() + HRTIME_MSECONDS(1000);
lastCheck = 0;
SET_HANDLER((UDPNetContHandler)&UDPNetHandler::startNetEvent);
SET_HANDLER(&UDPNetHandler::startNetEvent);
}

int
UDPNetHandler::startNetEvent(int event, Event *e)
{
(void)event;
SET_HANDLER((UDPNetContHandler)&UDPNetHandler::mainNetEvent);
SET_HANDLER(&UDPNetHandler::mainNetEvent);
trigger_event = e;
e->schedule_every(-HRTIME_MSECONDS(UDP_NH_PERIOD));
return EVENT_CONT;
Expand Down
5 changes: 1 addition & 4 deletions proxy/CacheControl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,7 @@ struct CC_FreerContinuation : public Continuation {
delete this;
return EVENT_DONE;
}
CC_FreerContinuation(CC_table *ap) : Continuation(nullptr), p(ap)
{
SET_HANDLER((CC_FreerContHandler)&CC_FreerContinuation::freeEvent);
}
CC_FreerContinuation(CC_table *ap) : Continuation(nullptr), p(ap) { SET_HANDLER(&CC_FreerContinuation::freeEvent); }
};

// struct CC_UpdateContinuation
Expand Down
2 changes: 1 addition & 1 deletion proxy/logging/Log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ struct PeriodicWakeup : Continuation {
PeriodicWakeup(int preproc_threads, int flush_threads)
: Continuation(new_ProxyMutex()), m_preproc_threads(preproc_threads), m_flush_threads(flush_threads)
{
SET_HANDLER((PeriodicWakeupHandler)&PeriodicWakeup::wakeup);
SET_HANDLER(&PeriodicWakeup::wakeup);
}
};

Expand Down
Loading