| 184 | */ |
| 185 | template<class Tracer> |
| 186 | forceinline void |
| 187 | Engine<Tracer>::terminated(void) { |
| 188 | unsigned int n; |
| 189 | _m_term.acquire(); |
| 190 | n = --_n_not_terminated; |
| 191 | _m_term.release(); |
| 192 | // The signal must be outside of the look, otherwise a thread might be |
| 193 | // terminated that still holds a mutex. |
| 194 | if (n == 0) |
| 195 | _e_terminate.signal(); |
| 196 | } |
| 197 | |
| 198 | template<class Tracer> |
| 199 | forceinline void |