/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include <cerrno>
+#include <cstring>
+
#include <utility>
#include <string>
#include <xbt/config.hpp>
+#include <xbt/log.h>
#include <xbt/range.hpp>
+#include <xbt/sysdep.h>
#include "src/internal_config.h"
#include "xbt/log.h"
#include "xbt/swag.h"
#include "xbt/xbt_os_thread.h"
#include "smx_private.h"
-#include "smx_private.hpp"
#include "simgrid/sg_config.h"
#include "src/internal_config.h"
#include "simgrid/modelchecker.h"
static std::pair<const char*, simgrid::simix::ContextFactoryInitializer> context_factories[] = {
#if HAVE_RAW_CONTEXTS
- { "raw", simgrid::simix::raw_factory },
+ { "raw", &simgrid::simix::raw_factory },
#endif
#if HAVE_UCONTEXT_CONTEXTS
- { "ucontext", simgrid::simix::sysv_factory },
+ { "ucontext", &simgrid::simix::sysv_factory },
#endif
#if HAVE_BOOST_CONTEXTS
- { "boost", simgrid::simix::boost_factory },
+ { "boost", &simgrid::simix::boost_factory },
#endif
#if HAVE_THREAD_CONTEXTS
- { "thread", simgrid::simix::thread_factory },
+ { "thread", &simgrid::simix::thread_factory },
#endif
};
if (simix_global->context_factory)
return;
/* select the context factory to use to create the contexts */
- if (simgrid::simix::factory_initializer) {
+ if (simgrid::simix::factory_initializer) { // Give Java a chance to hijack the factory mechanism
simix_global->context_factory = simgrid::simix::factory_initializer();
return;
}
}
/**
- * \brief Returns the number of parallel threads used
- * for the user contexts.
+ * @brief Returns the number of parallel threads used for the user contexts.
* \return the number of threads (1 means no parallelism)
*/
int SIMIX_context_get_nthreads(void) {