From:
- comment in file kmp_tasking.c line 1489
- file kmp_taskdeps.cpp line 558
- file kmp_taskdeps.cpp line 491
I consider that, not only 'team_serial', but also 'tasking_ser' and 'final' flags from kmp_taskdata_t should be used to determine whether it's necessary to read the volatile flag.
By the same logic used in wait_deps and task_with_deps, any of these three flags being set is a sufficient condition for the task to skip the waiting.
Please let me know your opinions. Thanks.