#include <I_ProtectedQueue.h>
Public Member Functions | |
void | enqueue (Event *e, bool fast_signal=false) |
void | signal () |
int | try_signal () |
void | enqueue_local (Event *e) |
void | remove (Event *e) |
Event * | dequeue_local () |
void | dequeue_timed (ink_hrtime cur_time, ink_hrtime timeout, bool sleep) |
Que (Event, link) localQueue | |
ProtectedQueue () | |
Data Fields | |
InkAtomicList | al |
ink_mutex | lock |
ink_cond | might_have_data |
Definition at line 40 of file I_ProtectedQueue.h.
TS_INLINE ProtectedQueue::ProtectedQueue | ( | ) |
Definition at line 37 of file P_ProtectedQueue.h.
References al, ink_atomiclist_init(), ink_cond_init(), ink_mutex_init(), lock, and might_have_data.
TS_INLINE Event * ProtectedQueue::dequeue_local | ( | ) |
Definition at line 86 of file P_ProtectedQueue.h.
References Event::in_the_prot_queue, and ink_assert.
Referenced by EThread::execute().
void ProtectedQueue::dequeue_timed | ( | ink_hrtime | cur_time, | |
ink_hrtime | timeout, | |||
bool | sleep | |||
) |
Definition at line 141 of file ProtectedQueue.cc.
References al, Action::cancelled, ClassAllocator< C >::free(), SLL< C, L >::head, INK_ATOMICLIST_EMPTY, ink_atomiclist_popall(), ink_cond_timedwait(), ink_hrtime_to_timespec(), ink_mutex_acquire(), ink_mutex_release(), lock, might_have_data, Action::mutex, SLL< C, L >::pop(), and SLL< C, L >::push().
Referenced by EThread::execute().
void ProtectedQueue::enqueue | ( | Event * | e, | |
bool | fast_signal = false | |||
) |
Definition at line 48 of file ProtectedQueue.cc.
References al, Event::ethread, EThread::ethreads_to_be_signalled, eventProcessor, EThread::EventQueueExternal, EThread::id, Event::in_the_priority_queue, Event::in_the_prot_queue, ink_assert, ink_atomiclist_push(), EventProcessor::n_ethreads, EThread::n_ethreads_to_be_signalled, signal(), EThread::signal_hook, this_ethread(), and try_signal().
Referenced by EventProcessor::schedule(), and EThread::schedule().
TS_INLINE void ProtectedQueue::enqueue_local | ( | Event * | e | ) |
Definition at line 69 of file P_ProtectedQueue.h.
References Event::in_the_priority_queue, Event::in_the_prot_queue, and ink_assert.
Referenced by EThread::process_event(), Event::schedule_at(), Event::schedule_every(), Event::schedule_imm(), Event::schedule_in(), and EThread::schedule_local().
ProtectedQueue::Que | ( | Event | , | |
link | ||||
) |
TS_INLINE void ProtectedQueue::remove | ( | Event * | e | ) |
Definition at line 77 of file P_ProtectedQueue.h.
References al, Event::in_the_prot_queue, ink_assert, and ink_atomiclist_remove().
TS_INLINE void ProtectedQueue::signal | ( | ) |
Definition at line 46 of file P_ProtectedQueue.h.
References ink_cond_signal(), ink_mutex_acquire(), ink_mutex_release(), lock, and might_have_data.
Referenced by enqueue(), and flush_signals().
TS_INLINE int ProtectedQueue::try_signal | ( | ) |
Definition at line 55 of file P_ProtectedQueue.h.
References ink_cond_signal(), ink_mutex_release(), ink_mutex_try_acquire(), lock, and might_have_data.
Referenced by enqueue(), and flush_signals().
Definition at line 50 of file I_ProtectedQueue.h.
Referenced by dequeue_timed(), enqueue(), EThread::execute(), ProtectedQueue(), and remove().
Definition at line 51 of file I_ProtectedQueue.h.
Referenced by dequeue_timed(), ProtectedQueue(), signal(), and try_signal().
Definition at line 52 of file I_ProtectedQueue.h.
Referenced by dequeue_timed(), ProtectedQueue(), signal(), and try_signal().