X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7516e3d43bd243928406a631bc5c9e89b2789f04..173f89c2bae47be8560b162d55983b6554f44669:/src/java/jxbt_context.c diff --git a/src/java/jxbt_context.c b/src/java/jxbt_context.c index 4934ce7bab..54a87e9195 100644 --- a/src/java/jxbt_context.c +++ b/src/java/jxbt_context.c @@ -12,6 +12,7 @@ #include "xbt/log.h" #include "xbt/dynar.h" #include "xbt/xbt_os_thread.h" +#include "xbt/ex_interface.h" #include "java/jxbt_context.h" #include "java/jmsg.h" #include "java/jmsg_process.h" @@ -115,6 +116,7 @@ xbt_context_free(xbt_context_t context) { if(context->exception) free(context->exception); + free(context->name); free(context); context = NULL; } @@ -270,13 +272,14 @@ xbt_context_start(xbt_context_t context) { xbt_context_t -xbt_context_new(xbt_context_function_t code, +xbt_context_new(const char *name, xbt_main_func_t code, void_f_pvoid_t startup_func, void *startup_arg, void_f_pvoid_t cleanup_func, void *cleanup_arg, int argc, char *argv[]) { xbt_context_t context = xbt_new0(s_xbt_context_t,1); context->code = code; + context->name = xbt_strdup(name); context->mutex = xbt_os_mutex_init(); context->cond = xbt_os_cond_init();