@@ -77,7 +77,7 @@ namespace RTC
77
77
#ifndef OPENRTM_VERSION_TRUNK
78
78
invoke_worker iw;
79
79
struct timeval tbegin, tend;
80
- std::vector<double > processes (m_comps.size ());
80
+ std::vector<double > processes (m_comps.size ());
81
81
gettimeofday (&tbegin, NULL );
82
82
for (unsigned int i=0 ; i< m_comps.size (); i++){
83
83
iw (m_comps[i]);
@@ -88,9 +88,23 @@ namespace RTC
88
88
}
89
89
#else
90
90
struct timeval tbegin, tend;
91
- const RTCList& list = getComponentList ();
91
+ const RTCList& list2 = getComponentList ();
92
+ RTCList list;
93
+ list.length (list2.length ()+1 );
94
+ list[0 ] = getOwner ();
95
+ for (unsigned int i=0 ; i<list2.length (); i++){
96
+ list[i+1 ] = list2[i];
97
+ }
92
98
std::vector<double > processes (list.length ());
93
99
gettimeofday (&tbegin, NULL );
100
+ ExecutionContextBase::invokeWorkerPreDo ();
101
+ {
102
+ std::unique_lock<std::mutex> guard (m_workerthread.mutex_ );
103
+ while (!m_workerthread.running_ )
104
+ {
105
+ m_workerthread.cond_ .wait (guard);
106
+ }
107
+ }
94
108
for (unsigned int i=0 ; i< list.length (); i++){
95
109
RTC_impl::RTObjectStateMachine* rtobj = m_worker.findComponent (list[i]);
96
110
rtobj->workerDo ();
@@ -99,6 +113,7 @@ namespace RTC
99
113
processes[i] = dt;
100
114
tbegin = tend;
101
115
}
116
+ ExecutionContextBase::invokeWorkerPostDo ();
102
117
#endif
103
118
if (loop % debug_count == 0 && ENABLE_DEBUG_PRINT &&
104
119
rtc_names.size () == processes.size ()) {
0 commit comments