summaryrefslogtreecommitdiff
path: root/ace/Timer_Queue_Adapters.inl
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2004-06-16 07:58:09 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2004-06-16 07:58:09 +0000
commit5db6a116406b02ad826677d56474373139b5e461 (patch)
treea52a3ebe70100dd6ee98945618918994ed8f30cc /ace/Timer_Queue_Adapters.inl
parent393a25f7bd25beca509700ba1a568442c1a0921c (diff)
downloadATCD-5db6a116406b02ad826677d56474373139b5e461.tar.gz
ChangeLogTag: Wed Jun 16 07:56:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ace/Timer_Queue_Adapters.inl')
-rw-r--r--ace/Timer_Queue_Adapters.inl51
1 files changed, 51 insertions, 0 deletions
diff --git a/ace/Timer_Queue_Adapters.inl b/ace/Timer_Queue_Adapters.inl
new file mode 100644
index 00000000000..e2aa5c562cf
--- /dev/null
+++ b/ace/Timer_Queue_Adapters.inl
@@ -0,0 +1,51 @@
+/* -*- C++ -*- */
+// $Id$
+
+template<class TQ> ACE_INLINE TQ &
+ACE_Thread_Timer_Queue_Adapter<TQ>::timer_queue (void)
+{
+ return *(this->timer_queue_);
+}
+
+template<class TQ> ACE_INLINE TQ *
+ACE_Thread_Timer_Queue_Adapter<TQ>::timer_queue (void) const
+{
+ return this->timer_queue_;
+}
+
+template<class TQ> ACE_INLINE int
+ACE_Thread_Timer_Queue_Adapter<TQ>::timer_queue (TQ *tq)
+{
+ if (this->delete_timer_queue_ != 0)
+ delete this->timer_queue_;
+ this->timer_queue_ = tq;
+ this->delete_timer_queue_ = 0;
+ return 0;
+}
+
+template<class TQ> ACE_INLINE ACE_thread_t
+ACE_Thread_Timer_Queue_Adapter<TQ>::thr_id (void) const
+{
+ return this->thr_id_;
+}
+
+template<class TQ> ACE_INLINE int
+ACE_Thread_Timer_Queue_Adapter<TQ>::activate (long flags,
+ int ,
+ int ,
+ long priority,
+ int grp_id,
+ ACE_Task_Base *task,
+ ACE_hthread_t thread_handles[],
+ void *stack[],
+ size_t stack_size[],
+ ACE_thread_t thread_names[])
+{
+ // Macros to avoid "warning: unused parameter" type warning.
+ ACE_UNUSED_ARG (thread_handles);
+
+ // Make sure that we only allow a single thread to be spawned for
+ // our adapter. Otherwise, too many weird things can happen.
+ return ACE_Task_Base::activate (flags, 1, 0, priority, grp_id, task, 0,
+ stack, stack_size, thread_names);
+}