Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add a dangerous MSG_task_ref() needed by lua to not free tasks twice when they get...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 23 Mar 2010 21:48:35 +0000 (21:48 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 23 Mar 2010 21:48:35 +0000 (21:48 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7336 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/msg/msg.h
src/msg/gos.c
src/simix/private.h

index 409a59d..33c7a59 100644 (file)
@@ -112,6 +112,7 @@ XBT_PUBLIC(m_host_t) MSG_task_get_source(m_task_t task);
 XBT_PUBLIC(const char *) MSG_task_get_name(m_task_t task);
 XBT_PUBLIC(MSG_error_t) MSG_task_cancel(m_task_t task);
 XBT_PUBLIC(MSG_error_t) MSG_task_destroy(m_task_t task);
+XBT_PUBLIC(void) MSG_task_ref(m_task_t t);
 
 XBT_PUBLIC(MSG_error_t) MSG_task_get(m_task_t * task, m_channel_t channel);
 XBT_PUBLIC(MSG_error_t) MSG_task_get_with_timeout(m_task_t * task,
index 321bfef..4a999fe 100644 (file)
@@ -44,8 +44,9 @@ MSG_error_t MSG_task_execute(m_task_t task)
   CHECK_HOST();
 
   simdata = task->simdata;
-  xbt_assert1((!simdata->compute)
-              && (task->simdata->refcount == 1),
+
+  xbt_assert1((!simdata->compute),
+              //&& (task->simdata->refcount == 1), FIXME: since lua bindings play with this refcount to make sure that tasks don't get gc() twice, this field cannot be used here as is anymore
               "This task is executed somewhere else. Go fix your code! %d", task->simdata->refcount);
 
   DEBUG1("Computing on %s", MSG_process_self()->simdata->m_host->name);
index f8012e5..65e93e9 100644 (file)
@@ -246,7 +246,6 @@ void SIMIX_ctx_thread_factory_init(smx_context_factory_t * factory);
 
 void SIMIX_ctx_sysv_factory_init(smx_context_factory_t * factory);
 void SIMIX_ctx_lua_factory_init(smx_context_factory_t * factory);
-void SIMIX_ctx_lua_factory_set_state(void *state);
 
 
 void SIMIX_ctx_java_factory_init(smx_context_factory_t * factory);