[Openmp-commits] [openmp] r259109 - Merging r258990:
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jan 28 15:01:12 PST 2016
Author: jlpeyton
Date: Thu Jan 28 17:01:11 2016
New Revision: 259109
URL: http://llvm.org/viewvc/llvm-project?rev=259109&view=rev
Log:
Merging r258990:
------------------------------------------------------------------------
r258990 | jlpeyton | 2016-01-27 15:20:26 -0600 (Wed, 27 Jan 2016) | 5 lines
Restore th_current_task first as suggested by John Mellor-Crummey
If an asynchronous inquiry peers into the runtime system
it doesn't see the freed task as the current task.
------------------------------------------------------------------------
Modified:
openmp/branches/release_38/ (props changed)
openmp/branches/release_38/runtime/src/kmp_tasking.c
Propchange: openmp/branches/release_38/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 28 17:01:11 2016
@@ -1 +1 @@
-/openmp/trunk:257833,258169,258528,258695
+/openmp/trunk:257833,258169,258528,258695,258990
Modified: openmp/branches/release_38/runtime/src/kmp_tasking.c
URL: http://llvm.org/viewvc/llvm-project/openmp/branches/release_38/runtime/src/kmp_tasking.c?rev=259109&r1=259108&r2=259109&view=diff
==============================================================================
--- openmp/branches/release_38/runtime/src/kmp_tasking.c (original)
+++ openmp/branches/release_38/runtime/src/kmp_tasking.c Thu Jan 28 17:01:11 2016
@@ -691,13 +691,12 @@ __kmp_task_finish( kmp_int32 gtid, kmp_t
}
// Free this task and then ancestor tasks if they have no children.
+ // Restore th_current_task first as suggested by John:
+ // johnmc: if an asynchronous inquiry peers into the runtime system
+ // it doesn't see the freed task as the current task.
+ thread->th.th_current_task = resumed_task;
__kmp_free_task_and_ancestors(gtid, taskdata, thread);
- // FIXME johnmc: I this statement should be before the last one so if an
- // asynchronous inquiry peers into the runtime system it doesn't see the freed
- // task as the current task
- __kmp_threads[ gtid ] -> th.th_current_task = resumed_task; // restore current_task
-
// TODO: GEH - make sure root team implicit task is initialized properly.
// KMP_DEBUG_ASSERT( resumed_task->td_flags.executing == 0 );
resumed_task->td_flags.executing = 1; // resume previous task
More information about the Openmp-commits
mailing list