//! Add an element to the blocking queue inline void enqueue_to_head(const T& elem) { m_mutex.lock(); m_queue.push_front(elem); // Signal threads waiting on the queue if (sleeping) wake_a_fiber(); m_mutex.unlock(); }
//! Add an element to the blocking queue inline void enqueue_to_head(const T& elem) { m_mutex.lock(); m_queue.push_front(elem); // Signal threads waiting on the queue if (sleeping) m_conditional.signal(); m_mutex.unlock(); }
static inline void schedule_irq (const caction& ad) { context_map_type::iterator pos = context_map_.find (ad.automaton); kassert (pos != context_map_.end ()); automaton_context* c = pos->second; c->push_front (ad); ready_queue_.push_front (c); }