summaryrefslogtreecommitdiff
path: root/trunk/TAO/examples/RTCORBA/Activity/Thread_Task.h
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/TAO/examples/RTCORBA/Activity/Thread_Task.h')
-rw-r--r--trunk/TAO/examples/RTCORBA/Activity/Thread_Task.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/trunk/TAO/examples/RTCORBA/Activity/Thread_Task.h b/trunk/TAO/examples/RTCORBA/Activity/Thread_Task.h
new file mode 100644
index 00000000000..ae8f3a3ef2a
--- /dev/null
+++ b/trunk/TAO/examples/RTCORBA/Activity/Thread_Task.h
@@ -0,0 +1,45 @@
+/* -*- C++ -*- */
+//=============================================================================
+/**
+ * @file Thread_Task.h
+ *
+ * $Id$
+ *
+ * A periodic task implementation that uses sleep.
+ *
+ * @author Pradeep Gore <pradeep@cs.wustl.edu>
+ */
+//=============================================================================
+#ifndef THREAD_TASK_H
+#define THREAD_TASK_H
+
+#include "Periodic_Task.h"
+
+/**
+ * @class Thread_Task
+ *
+ * @brief A periodic task implementation that uses sleep.
+ *
+ * simplified Periodic Task -
+ * if the <name_> activity, which is fired every <period_> time intervals,
+ * exceeds its <exec_time_>, it is "late".
+ * if <exec_time_> is greater than the <period_>, the activity(s) for the
+ * overlapped period(s) are considered "missed".
+ *
+ */
+class activity_Export Thread_Task : public Periodic_Task
+{
+ public:
+ /// Constructor
+ Thread_Task (void);
+
+ /// Activate thread(s).
+ virtual int activate_task (ACE_Barrier* barrier, RTCORBA::PriorityMapping *priority_mapping);
+
+ protected:
+
+ /// task svc
+ virtual int svc (void);
+};
+
+#endif /* THREAD_TASK_H */