Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix copyright headers
[simgrid.git] / src / msg / gos.c
index 267309b..4e90b14 100644 (file)
@@ -1,8 +1,5 @@
-/*     $Id$      */
-
-/* Copyright (c) 2002-2007 Arnaud Legrand.                                  */
-/* Copyright (c) 2007 Bruno Donassolo.                                      */
-/* All rights reserved.                                                     */
+/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -53,9 +50,12 @@ MSG_error_t MSG_task_execute(m_task_t task)
 
   DEBUG1("Computing on %s", MSG_process_self()->simdata->m_host->name);
 
-  if (simdata->comp_amount == 0)
+  if (simdata->computation_amount == 0) {
+#ifdef HAVE_TRACING
+    TRACE_msg_task_execute_end (task);
+#endif
     return MSG_OK;
-
+  }
   simdata->refcount++;
   SIMIX_mutex_lock(simdata->mutex);
   simdata->compute =