#include <csignal>
#include <functional>
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
extern unsigned stack_size;
extern unsigned guard_size;
virtual void run_all(std::vector<actor::ActorImpl*> const& actors_list) = 0;
+ /* This allows Java to hijack the context factory (Java induces factories of factory :) */
+ static std::function<ContextFactory*(void)> initializer;
+
protected:
template <class T, class... Args> T* new_context(Args&&... args)
{
virtual void attach_stop() = 0;
};
-
-/* This allows Java to hijack the context factory (Java induces factories of factory :) */
-using ContextFactoryInitializer = ContextFactory* (*)();
-XBT_PUBLIC_DATA ContextFactoryInitializer factory_initializer;
-
XBT_PRIVATE ContextFactory* thread_factory();
XBT_PRIVATE ContextFactory* sysv_factory();
XBT_PRIVATE ContextFactory* raw_factory();
XBT_PUBLIC void set_nthreads(int nb_threads);
XBT_PUBLIC void set_parallel_mode(e_xbt_parmap_mode_t mode);
XBT_PUBLIC e_xbt_parmap_mode_t get_parallel_mode();
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
#endif