1 /* a fast and simple context switching library */
3 /* Copyright (c) 2009-2022. The SimGrid Team. All rights reserved. */
5 /* This program is free software; you can redistribute it and/or modify it
6 * under the terms of the license (GNU LGPL) which comes with this package. */
8 #include "src/kernel/context/Context.hpp"
10 #define SIMIX_H_NO_DEPRECATED_WARNING // avoid deprecation warning on include (remove with XBT_ATTRIB_DEPRECATED_v333)
11 #include <simgrid/simix.h>
13 int SIMIX_context_is_parallel() // XBT_ATTRIB_DEPRECATED_v333
15 return simgrid::kernel::context::is_parallel();
18 int SIMIX_context_get_nthreads() // XBT_ATTRIB_DEPRECATED_v333
20 return simgrid::kernel::context::get_nthreads();
23 void SIMIX_context_set_nthreads(int nb_threads) // XBT_ATTRIB_DEPRECATED_v333
25 simgrid::kernel::context::set_nthreads(nb_threads);
28 e_xbt_parmap_mode_t SIMIX_context_get_parallel_mode() // XBT_ATTRIB_DEPRECATED_v333
30 return simgrid::kernel::context::get_parallel_mode();
33 void SIMIX_context_set_parallel_mode(e_xbt_parmap_mode_t mode) // XBT_ATTRIB_DEPRECATED_v333
35 simgrid::kernel::context::set_parallel_mode(mode);