Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add debug.
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sat, 4 Aug 2007 21:24:41 +0000 (21:24 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sat, 4 Aug 2007 21:24:41 +0000 (21:24 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3948 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/xbt/context.c

index 96476aa..2ffe4de 100644 (file)
@@ -68,6 +68,7 @@ static void __xbt_context_yield(xbt_context_t context)
     current_context = self;
   }
 #else                          /* use SUSv2 contexts */
     current_context = self;
   }
 #else                          /* use SUSv2 contexts */
+  VOIRP(current_context);
   if (current_context)
     VOIRP(current_context->save);
 
   if (current_context)
     VOIRP(current_context->save);
 
@@ -264,6 +265,7 @@ void xbt_context_init(void)
     current_context = init_context = xbt_new0(s_xbt_context_t, 1);
     DEBUG1("Init Context (%p)", init_context);
 
     current_context = init_context = xbt_new0(s_xbt_context_t, 1);
     DEBUG1("Init Context (%p)", init_context);
 
+    init_context->iwannadie = 0; /* useless but makes valgrind happy */
     init_context->exception = xbt_new(ex_ctx_t, 1);
     XBT_CTX_INITIALIZE(init_context->exception);
     __xbt_ex_ctx = __context_ex_ctx;
     init_context->exception = xbt_new(ex_ctx_t, 1);
     XBT_CTX_INITIALIZE(init_context->exception);
     __xbt_ex_ctx = __context_ex_ctx;
@@ -367,6 +369,8 @@ xbt_context_t xbt_context_new(xbt_main_func_t code,
       pth_sksize_makecontext(res->stack, STACK_SIZE);
 #endif                         /* CONTEXT_THREADS or not */
 
       pth_sksize_makecontext(res->stack, STACK_SIZE);
 #endif                         /* CONTEXT_THREADS or not */
 
+  res->iwannadie = 0; /* useless but makes valgrind happy */
+
   res->argc = argc;
   res->argv = argv;
   res->startup_func = startup_func;
   res->argc = argc;
   res->argv = argv;
   res->startup_func = startup_func;