MCPcopy Create free account
hub / github.com/apache/trafficserver / schedule

Method schedule

src/iocore/eventsystem/P_UnixEThread.h:100–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100TS_INLINE Event *
101EThread::schedule(Event *e)
102{
103 e->ethread = this;
104 if (tt != REGULAR) {
105 ink_assert(tt == DEDICATED);
106 return eventProcessor.schedule(e, ET_CALL);
107 }
108 if (e->continuation->mutex) {
109 e->mutex = e->continuation->mutex;
110 } else {
111 e->mutex = e->continuation->mutex = e->ethread->mutex;
112 }
113 ink_assert(e->mutex.get());
114
115 // Make sure client IP debugging works consistently
116 // The continuation that gets scheduled later is not always the
117 // client VC, it can be HttpCacheSM etc. so save the flags
118 e->continuation->control_flags.set_flags(get_cont_flags().get_flags());
119
120 if (e->ethread == this_ethread()) {
121 EventQueueExternal.enqueue_local(e);
122 } else {
123 EventQueueExternal.enqueue(e);
124 }
125
126 return e;
127}
128
129TS_INLINE Event *
130EThread::schedule_imm_local(Continuation *cont, int callback_event, void *cookie)

Callers 1

schedule_localMethod · 0.45

Calls 7

get_cont_flagsFunction · 0.85
this_ethreadFunction · 0.85
set_flagsMethod · 0.80
enqueue_localMethod · 0.80
getMethod · 0.45
get_flagsMethod · 0.45
enqueueMethod · 0.45

Tested by

no test coverage detected