2 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
4 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE, class TIME_POLICY> ACE_INLINE void
5 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::water_marks (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd,
8 ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::water_marks");
9 if (cmd == ACE_IO_Cntl_Msg::SET_LWM)
10 this->msg_queue_->low_water_mark (wm_size);
11 else /* cmd == ACE_IO_Cntl_Msg::SET_HWM */
12 this->msg_queue_->high_water_mark (wm_size);
15 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE, class TIME_POLICY> ACE_INLINE int
16 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::getq (ACE_MESSAGE_TYPE *&mb, ACE_Time_Value *tv)
18 ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::getq");
19 return this->msg_queue_->dequeue_head (mb, tv);
22 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE, class TIME_POLICY> ACE_INLINE int
23 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::putq (ACE_MESSAGE_TYPE *mb, ACE_Time_Value *tv)
25 ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::putq");
26 return this->msg_queue_->enqueue_tail (mb, tv);
29 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE, class TIME_POLICY> ACE_INLINE int
30 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::ungetq (ACE_MESSAGE_TYPE *mb, ACE_Time_Value *tv)
32 ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::ungetq");
33 return this->msg_queue_->enqueue_head (mb, tv);
36 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE, class TIME_POLICY> ACE_INLINE int
37 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::flush (u_long flag)
39 ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::flush");
40 if (ACE_BIT_ENABLED (flag, ACE_Task_Flags::ACE_FLUSHALL))
41 return this->msg_queue_ != 0 && this->msg_queue_->close ();
43 return -1; // Note, need to be more careful about what we free...
46 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE, class TIME_POLICY> ACE_INLINE void
47 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::msg_queue (ACE_Message_Queue_Ex<ACE_MESSAGE_TYPE, ACE_SYNCH_USE, TIME_POLICY> *mq)
49 ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::msg_queue");
50 if (this->delete_msg_queue_)
52 delete this->msg_queue_;
53 this->delete_msg_queue_ = false;
55 this->msg_queue_ = mq;
58 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE, class TIME_POLICY> ACE_Message_Queue_Ex<ACE_MESSAGE_TYPE, ACE_SYNCH_USE, TIME_POLICY> *
59 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::msg_queue ()
61 ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::msg_queue");
62 return this->msg_queue_;
65 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE, class TIME_POLICY> ACE_INLINE int
66 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::reply (ACE_MESSAGE_TYPE *mb, ACE_Time_Value *tv)
68 ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::reply");
71 return -1 ; // this->sibling ()->put_next (mb, tv);
74 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE, class TIME_POLICY> ACE_INLINE ACE_Task<ACE_SYNCH_USE, TIME_POLICY> *
75 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::next ()
77 ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::next");
81 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE, class TIME_POLICY> ACE_INLINE void
82 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::next (ACE_Task<ACE_SYNCH_USE, TIME_POLICY> *q)
84 ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::next");
88 // Transfer msg to the next ACE_Task_Ex.
90 template <ACE_SYNCH_DECL, class ACE_MESSAGE_TYPE, class TIME_POLICY> ACE_INLINE int
91 ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::put_next (
92 ACE_MESSAGE_TYPE * /* msg */,
93 ACE_Time_Value * /* tv */)
95 ACE_TRACE ("ACE_Task_Ex<ACE_SYNCH_USE,ACE_MESSAGE_TYPE, TIME_POLICY>::put_next");
96 return -1; // this->next_ == 0 ? -1 : this->next_->put (msg, tv);
99 ACE_END_VERSIONED_NAMESPACE_DECL