diff --git a/iocore/eventsystem/Continuation.cc b/iocore/eventsystem/Continuation.cc index 26de73b5d7a..c6936322dca 100644 --- a/iocore/eventsystem/Continuation.cc +++ b/iocore/eventsystem/Continuation.cc @@ -23,15 +23,6 @@ #include "I_EventSystem.h" #include "I_Continuation.h" -#include "I_EThread.h" - -int -Continuation::handleEvent(int event, void *data) -{ - // If there is a lock, we must be holding it on entry - ink_release_assert(!mutex || mutex->thread_holding == this_ethread()); - return (this->*handler)(event, data); -} int Continuation::dispatchEvent(int event, void *data) diff --git a/iocore/eventsystem/I_Continuation.h b/iocore/eventsystem/I_Continuation.h index 8d662d6a78e..53c3919249d 100644 --- a/iocore/eventsystem/I_Continuation.h +++ b/iocore/eventsystem/I_Continuation.h @@ -45,6 +45,9 @@ class ContinuationQueue; class Processor; class ProxyMutex; class EThread; +class Event; + +extern EThread *this_ethread(); ////////////////////////////////////////////////////////////////////////////// // @@ -154,7 +157,13 @@ class Continuation : private force_VFPT_to_top @return State machine and processor specific return code. */ - int handleEvent(int event = CONTINUATION_EVENT_NONE, void *data = nullptr); + TS_INLINE int + handleEvent(int event = CONTINUATION_EVENT_NONE, void *data = nullptr) + { + // If there is a lock, we must be holding it on entry + ink_release_assert(!mutex || mutex->thread_holding == this_ethread()); + return (this->*handler)(event, data); + } /** Receives the event code and data for an Event.