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

Method enqueue

src/iocore/eventsystem/ProtectedQueue.cc:46–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44extern ClassAllocator<Event, false> eventAllocator;
45
46void
47ProtectedQueue::enqueue(Event *e)
48{
49 ink_assert(!e->in_the_prot_queue && !e->in_the_priority_queue);
50 EThread *e_ethread = e->ethread;
51 e->in_the_prot_queue = 1;
52 bool was_empty = (ink_atomiclist_push(&al, e) == nullptr);
53
54 if (was_empty) {
55 EThread *inserting_thread = this_ethread();
56 // queue e->ethread in the list of threads to be signalled
57 // inserting_thread == 0 means it is not a regular EThread
58 if (inserting_thread != e_ethread) {
59 e_ethread->tail_cb->signalActivity();
60 }
61 }
62}
63
64void
65ProtectedQueue::dequeue_external()

Callers 15

cplist_reconfigureFunction · 0.45
cplist_initFunction · 0.45
cplist_updateFunction · 0.45
getMethod · 0.45
_tickMethod · 0.45
_victimizeMethod · 0.45
RamCacheCLFUS.ccFile · 0.45
putMethod · 0.45
getMethod · 0.45
putMethod · 0.45
BuildListFromStringMethod · 0.45

Calls 3

ink_atomiclist_pushFunction · 0.85
this_ethreadFunction · 0.85
signalActivityMethod · 0.45

Tested by 1

create_configFunction · 0.36