#include <xbt/function_types.h>
#include <simix/simix.h>
#include "smx_context_java.h"
-#include "simix/process_private.h"
#include "xbt/dynar.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(jmsg, bindings, "MSG for Java(TM)");
void_pfn_smxprocess_t cleanup_func,
void* data)
{
- fprintf(stderr,"XXXX Create Context\n");
+ DEBUG0("XXXX Create Context\n");
smx_ctx_java_t context = xbt_new0(s_smx_ctx_java_t, 1);
/* If the user provided a function for the process then use it
static void smx_ctx_java_stop(smx_context_t context)
{
jobject jprocess = NULL;
- fprintf(stderr,"XXXX Context Stop\n");
+ DEBUG0("XXXX Context Stop\n");
smx_ctx_java_t ctx_java;
// FIXME: inline those functions
static void smx_ctx_java_resume(smx_context_t new_context)
{
- fprintf(stderr,"XXXX Context Resume\n");
+ DEBUG0("XXXX Context Resume\n");
jprocess_schedule(new_context);
}
static void smx_ctx_java_runall(xbt_dynar_t processes)
{
- fprintf(stderr,"XXXX Run all\n");
+ DEBUG0("XXXX Run all\n");
smx_process_t process;
smx_context_t old_context;
unsigned int cursor;
xbt_dynar_foreach(processes, cursor, process) {
old_context = my_current_context;
- my_current_context = process->context;
+ my_current_context = SIMIX_process_get_context(process);
smx_ctx_java_resume(my_current_context);
my_current_context = old_context;
}
xbt_dynar_reset(processes);
- fprintf(stderr,"XXXX End of run all\n");
+ DEBUG0("XXXX End of run all\n");
}