+int eThread::sync(void)
+{
+ int res;
+ int debug_val_before = m_state.value();
+ m_state.down(); /* this might block */
+ res = m_alive;
+ if (m_state.value() != 0)
+ eFatal("eThread::sync: m_state.value() == %d - was %d before", m_state.value(), debug_val_before);
+ ASSERT(m_state.value() == 0);
+ m_state.up();
+ return res; /* 0: thread is guaranteed not to run. 1: state unknown. */
+}
+
+int eThread::sendSignal(int sig)