From 3bc5f3b298f929eda7407bf233ad7e4846e57776 Mon Sep 17 00:00:00 2001 From: "Andrew M. B. Boktor" Date: Tue, 8 May 2012 11:46:07 -0800 Subject: Fixes a rare race condition that prevents the kernel stats from being printed. Merging //depot/gpgpu_sim_research/fermi_replay/distribution/src/gpgpusim_entrypoint.cc to //depot/gpgpu_sim_research/fermi/distribution/src/gpgpusim_entrypoint.cc [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 12356] --- src/gpgpusim_entrypoint.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gpgpusim_entrypoint.cc') diff --git a/src/gpgpusim_entrypoint.cc b/src/gpgpusim_entrypoint.cc index 76c63b5..3e7f813 100644 --- a/src/gpgpusim_entrypoint.cc +++ b/src/gpgpusim_entrypoint.cc @@ -110,8 +110,10 @@ void *gpgpu_sim_thread_concurrent(void*) do { // check if a kernel has completed unsigned grid_uid = g_the_gpu->finished_kernel(); - if( grid_uid ) - g_stream_manager->register_finished_kernel(grid_uid); + if( grid_uid ){ + g_stream_manager->register_finished_kernel(grid_uid); //this requires recursive mutexes but doesnt appear to have them :( but works anyway? + break; //force stats print and update + } // launch operation on device if one is pending and can be run stream_operation op = g_stream_manager->front(); -- cgit v1.3