summaryrefslogtreecommitdiff
path: root/runtime/src/ompt-specific.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-10-23 17:53:14 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-10-23 17:53:14 +0000
commit53265afff0dd5ba32642c444583e7d2bb25ca2e9 (patch)
tree62c6dca85a7f7ec8c3adb959c8d512cb140b705a /runtime/src/ompt-specific.cpp
parent1756886afc900127720de68088f9adff3108ef61 (diff)
Notes
Diffstat (limited to 'runtime/src/ompt-specific.cpp')
-rw-r--r--runtime/src/ompt-specific.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/src/ompt-specific.cpp b/runtime/src/ompt-specific.cpp
index 63153d274efb3..7fb81bb7d1a01 100644
--- a/runtime/src/ompt-specific.cpp
+++ b/runtime/src/ompt-specific.cpp
@@ -269,10 +269,11 @@ void __ompt_lw_taskteam_init(ompt_lw_taskteam_t *lwt, kmp_info_t *thr, int gtid,
}
void __ompt_lw_taskteam_link(ompt_lw_taskteam_t *lwt, kmp_info_t *thr,
- int on_heap) {
+ int on_heap, bool always) {
ompt_lw_taskteam_t *link_lwt = lwt;
- if (thr->th.th_team->t.t_serialized >
- 1) { // we already have a team, so link the new team and swap values
+ if (always ||
+ thr->th.th_team->t.t_serialized >
+ 1) { // we already have a team, so link the new team and swap values
if (on_heap) { // the lw_taskteam cannot stay on stack, allocate it on heap
link_lwt =
(ompt_lw_taskteam_t *)__kmp_allocate(sizeof(ompt_lw_taskteam_t));