Multithreading framework implementation

Explanation of what's going on:

Threads are controlled by the struct thr_ctrl* threads array. It contains two MUTEXes and two Conditions, setup,done and cond_set,cond_done.

The setup MUTEX always stays locked from the worker thread, but the thread implicitly frees it with cond_wait (cond_set, setup). The setup MUTEX serves as access control to the variables in the thr_ctrl struct.

The done MUTEX always stays locked from the main thread, but it is also impl. freed by cond_wait (cond_done, done)

If you want to use multithreading, you have to do the following:

That's it.

See matrix.h: TVector<T> Matrix<T>::operator * (const Vector<T>& v) const for an example.

Debugging:


Generated on Wed Nov 20 09:29:02 2013 for TBCI Numerical high perf. C++ Library by  doxygen 1.5.6