summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/LWFT/StateSyncAgentTask.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/LWFT/StateSyncAgentTask.h')
-rw-r--r--TAO/orbsvcs/orbsvcs/LWFT/StateSyncAgentTask.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/LWFT/StateSyncAgentTask.h b/TAO/orbsvcs/orbsvcs/LWFT/StateSyncAgentTask.h
new file mode 100644
index 00000000000..06e60e14548
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/LWFT/StateSyncAgentTask.h
@@ -0,0 +1,54 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file StateSyncAgentTask.h
+ *
+ * $Id$
+ *
+ * @author Friedhelm Wolf (fwolf@dre.vanderbilt.edu)
+ */
+//=============================================================================
+
+#ifndef _STATE_SYNC_AGENT_TASK_H_
+#define _STATE_SYNC_AGENT_TASK_H_
+
+#include "ace/Task.h"
+#include "ace/Barrier.h"
+#include "StateSynchronizationAgent_i.h"
+#include "ssa_export.h"
+
+class SSA_Export StateSyncAgentTask : public ACE_Task_Base
+{
+public:
+ StateSyncAgentTask (CORBA::ORB_ptr orb,
+ StateSynchronizationAgent_i * agent);
+
+ virtual int svc (void);
+
+ // Override, calls base class activate(), then wait() on barrier.
+ virtual int activate (long flags = THR_NEW_LWP | THR_JOINABLE | THR_INHERIT_SCHED,
+ int n_threads = 1,
+ int force_active = 0,
+ long priority = ACE_DEFAULT_THREAD_PRIORITY,
+ int grp_id = -1,
+ ACE_Task_Base *task = 0,
+ ACE_hthread_t thread_handles[] = 0,
+ void *stack[] = 0,
+ size_t stack_size[] = 0,
+ ACE_thread_t thread_ids[] = 0,
+ const char* thr_name[] = 0);
+
+ StateSynchronizationAgent_ptr agent_ref (void);
+
+ private:
+ CORBA::ORB_var orb_;
+
+ StateSynchronizationAgent_i * agent_;
+
+ ACE_Barrier sync_;
+
+ StateSynchronizationAgent_var agent_ref_;
+};
+
+#endif /* _STATE_SYNC_AGENT_TASK_H_ */