Propagate to all master threads (under my_arenas_list_mutex lock)
| 388 | } |
| 389 | // Propagate to all master threads (under my_arenas_list_mutex lock) |
| 390 | ForEachArena(a) { // uses lock on my_arenas_list_mutex |
| 391 | arena_slot &slot = a.my_slots[0]; |
| 392 | generic_scheduler *s = slot.my_scheduler; |
| 393 | // If the master is under construction, skip it. Otherwise make sure that it does not |
| 394 | // leave its arena and its scheduler get destroyed while we accessing its data. |
| 395 | if ( s && as_atomic(slot.my_scheduler).compare_and_swap(LockedMaster, s) == s ) { //TODO: remove need in lock |
| 396 | __TBB_ASSERT( slot.my_scheduler == LockedMaster, NULL ); |
| 397 | // The whole propagation sequence is locked, thus no contention is expected |
| 398 | __TBB_ASSERT( s != LockedMaster, NULL ); |
| 399 | s->propagate_task_group_state( mptr_state, src, new_state ); |
| 400 | __TBB_store_with_release( slot.my_scheduler, s ); |
| 401 | } |
| 402 | } EndForEach(); |
| 403 | return true; |
| 404 | } |
| 405 |
nothing calls this directly
no test coverage detected