Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix SIMIX calls
authorthiery <thiery@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 7 Dec 2010 16:38:33 +0000 (16:38 +0000)
committerthiery <thiery@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 7 Dec 2010 16:38:33 +0000 (16:38 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9079 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/simix/smx_deployment.c
src/xbt/xbt_sg_synchro.c

index 7a4a180..15620bb 100644 (file)
@@ -75,8 +75,8 @@ static void parse_process_finalize(void)
                                                     /*the props */
                                                     current_property_set);
     else
                                                     /*the props */
                                                     current_property_set);
     else
-      process = SIMIX_process_create(parse_argv[0], parse_code, NULL, parse_host, parse_argc, parse_argv,       /*the props */
-                                     current_property_set);
+      process = SIMIX_req_process_create(parse_argv[0], parse_code, NULL, parse_host, parse_argc, parse_argv,       /*the props */
+                                         current_property_set);
     /* verify if process has been created (won't be the case if the host is currently dead, but that's fine) */
     if (!process) {
       xbt_free(parse_host);
     /* verify if process has been created (won't be the case if the host is currently dead, but that's fine) */
     if (!process) {
       xbt_free(parse_host);
index 7c6bc74..6e9b0ae 100644 (file)
@@ -37,8 +37,8 @@ typedef struct s_xbt_thread_ {
 static int xbt_thread_create_wrapper(int argc, char *argv[])
 {
   xbt_thread_t t =
 static int xbt_thread_create_wrapper(int argc, char *argv[])
 {
   xbt_thread_t t =
-      (xbt_thread_t) SIMIX_process_get_data(SIMIX_process_self());
-  SIMIX_process_set_data(SIMIX_process_self(), t->father_data);
+      (xbt_thread_t) SIMIX_process_self_get_data();
+  SIMIX_req_process_set_data(SIMIX_process_self(), t->father_data);
   (*t->code) (t->userparam);
   if (t->joinable) {
     t->done = 1;
   (*t->code) (t->userparam);
   if (t->joinable) {
     t->done = 1;
@@ -61,12 +61,12 @@ xbt_thread_t xbt_thread_create(const char *name, void_f_pvoid_t code,
   res->name = xbt_strdup(name);
   res->userparam = param;
   res->code = code;
   res->name = xbt_strdup(name);
   res->userparam = param;
   res->code = code;
-  res->father_data = SIMIX_process_get_data(SIMIX_process_self());
+  res->father_data = SIMIX_process_self_get_data();
   /*   char*name = bprintf("%s#%p",SIMIX_process_self_get_name(), param); */
   /*   char*name = bprintf("%s#%p",SIMIX_process_self_get_name(), param); */
-  res->s_process = SIMIX_process_create(name,
-                                        xbt_thread_create_wrapper, res,
-                                        SIMIX_host_self_get_name(), 0, NULL,
-                                        /*props */ NULL);
+  res->s_process = SIMIX_req_process_create(name,
+                                            xbt_thread_create_wrapper, res,
+                                            SIMIX_host_self_get_name(), 0, NULL,
+                                            /*props */ NULL);
   res->joinable = joinable;
   res->done = 0;
   res->cond = xbt_cond_init();
   res->joinable = joinable;
   res->done = 0;
   res->cond = xbt_cond_init();
@@ -106,20 +106,19 @@ void xbt_thread_join(xbt_thread_t thread)
 
 void xbt_thread_cancel(xbt_thread_t thread)
 {
 
 void xbt_thread_cancel(xbt_thread_t thread)
 {
-  SIMIX_process_kill(thread->s_process, SIMIX_process_self());
+  SIMIX_req_process_kill(thread->s_process);
   free(thread->name);
   free(thread);
 }
 
 void xbt_thread_exit()
 {
   free(thread->name);
   free(thread);
 }
 
 void xbt_thread_exit()
 {
-  SIMIX_process_kill(SIMIX_process_self(), SIMIX_process_self());
+  SIMIX_req_process_kill(SIMIX_process_self());
 }
 
 xbt_thread_t xbt_thread_self(void)
 {
 }
 
 xbt_thread_t xbt_thread_self(void)
 {
-  smx_process_t p = SIMIX_process_self();
-  return p ? SIMIX_process_get_data(p) : NULL;
+  return SIMIX_process_self_get_data();
 }
 
 void xbt_thread_yield(void)
 }
 
 void xbt_thread_yield(void)