summaryrefslogtreecommitdiff
path: root/Kokyu/DSRT_Dispatch_Item_T.h
diff options
context:
space:
mode:
authorvenkita <venkita@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-07-25 23:41:55 +0000
committervenkita <venkita@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-07-25 23:41:55 +0000
commitd2c9289b2dc52324413eab4363e7f2cbef1f07ee (patch)
tree0c2d30977f52d7860362ff76b28ecc4d9a158421 /Kokyu/DSRT_Dispatch_Item_T.h
parenta9886196297b83689fa1ad00642af7d2a5c5fa72 (diff)
downloadATCD-d2c9289b2dc52324413eab4363e7f2cbef1f07ee.tar.gz
ChangeLogTag: Fri Jul 25 17:41:08 2003 Venkita Subramonian <venkita@cse.wustl.edu>
Diffstat (limited to 'Kokyu/DSRT_Dispatch_Item_T.h')
-rw-r--r--Kokyu/DSRT_Dispatch_Item_T.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/Kokyu/DSRT_Dispatch_Item_T.h b/Kokyu/DSRT_Dispatch_Item_T.h
new file mode 100644
index 00000000000..727920ef187
--- /dev/null
+++ b/Kokyu/DSRT_Dispatch_Item_T.h
@@ -0,0 +1,102 @@
+/* -*- C++ -*- */
+/**
+ * @file DSRT_Dispatch_Item.h
+ *
+ * $Id$
+ *
+ * @author Venkita Subramonian (venkita@cs.wustl.edu)
+ *
+ */
+
+#ifndef DSRT_DISPATCH_ITEM_H
+#define DSRT_DISPATCH_ITEM_H
+#include "ace/pre.h"
+#include "ace/Bound_Ptr.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "Kokyu_dsrt.h"
+
+namespace Kokyu
+{
+ /**
+ * @class DSRT_Dispatch_Item
+ *
+ * @brief This stores information about a schedulable thread.
+ */
+
+ template <class DSRT_Scheduler_Traits>
+ class DSRT_Dispatch_Item : private non_copyable
+ {
+ typedef typename
+ DSRT_Scheduler_Traits::Guid_t Guid_t;
+
+ typedef typename
+ DSRT_Scheduler_Traits::QoSDescriptor_t DSRT_QoSDescriptor;
+
+ protected:
+ ACE_hthread_t thr_handle_;
+ Guid_t guid_;
+ DSRT_QoSDescriptor qos_;
+ ACE_Time_Value insertion_time_;
+
+ public:
+ DSRT_Dispatch_Item (Guid_t guid, const DSRT_QoSDescriptor&);
+
+ /// Get the guid.
+ Guid_t guid ();
+
+ /// Get the associated qos value.
+ DSRT_QoSDescriptor qos ();
+
+ /// Get the thread handle.
+ ACE_hthread_t thread_handle ();
+
+ /// Set the thread handle.
+ void thread_handle (ACE_hthread_t &handle);
+
+ /// Get the insertion time.
+ ACE_Time_Value insertion_time ();
+
+ /// Set the insertion time.
+ void insertion_time (const ACE_Time_Value&);
+ };
+
+ /**
+ * @class DSRT_Dispatch_Item_var
+ *
+ * @brief Smart pointer to dynamically allocated <code>
+ * DSRT_Dispatch_Item </code> objects.
+ */
+ template <class DSRT_Scheduler_Traits>
+ class DSRT_Dispatch_Item_var :
+ public ACE_Strong_Bound_Ptr<
+ DSRT_Dispatch_Item<DSRT_Scheduler_Traits>,
+ ACE_SYNCH_MUTEX>
+ {
+ public:
+ ACE_EXPLICIT
+ DSRT_Dispatch_Item_var (DSRT_Dispatch_Item<DSRT_Scheduler_Traits>
+ *p = 0);
+
+ DSRT_Dispatch_Item_var (
+ const DSRT_Dispatch_Item_var<DSRT_Scheduler_Traits> &r);
+ };
+}
+
+#if defined (__ACE_INLINE__)
+#include "DSRT_Dispatch_Item_T.i"
+#endif /* __ACE_INLINE__ */
+
+#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
+#include "DSRT_Dispatch_Item_T.cpp"
+#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
+
+#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
+#pragma implementation ("DSRT_Dispatch_Item_T.cpp")
+#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
+
+#include "ace/post.h"
+#endif /* DSRT_DISPATCH_ITEM_H */