#if OMP_45_ENABLED
// Proxy tasks must always be allowed to free their parents
// because they can be run in background even in serial mode.
- kmp_int32 task_serial = taskdata->td_flags.task_serial && !taskdata->td_flags.proxy;
+ kmp_int32 team_serial = ( taskdata->td_flags.team_serial ||
+ taskdata->td_flags.tasking_ser ) && !taskdata->td_flags.proxy;
#else
- kmp_int32 task_serial = taskdata->td_flags.task_serial;
+ kmp_int32 team_serial = taskdata->td_flags.team_serial ||
+ taskdata->td_flags.tasking_ser;
#endif
KMP_DEBUG_ASSERT( taskdata -> td_flags.tasktype == TASK_EXPLICIT );
// Stop checking ancestors at implicit task
// instead of walking up ancestor tree to avoid premature deallocation of ancestors.
- if ( task_serial || taskdata -> td_flags.tasktype == TASK_IMPLICIT )
+ if ( team_serial || taskdata -> td_flags.tasktype == TASK_IMPLICIT )
return;
// Predecrement simulated by "- 1" calculation