int smx_context_stack_size_was_set = 0;
unsigned smx_context_guard_size;
int smx_context_guard_size_was_set = 0;
-static thread_local smx_context_t smx_current_context_parallel;
-static smx_context_t smx_current_context_serial;
+static thread_local smx_context_t smx_current_context;
static int smx_parallel_contexts = 1;
static int smx_parallel_threshold = 2;
static e_xbt_parmap_mode_t smx_parallel_synchronization_mode = XBT_PARMAP_DEFAULT;
*/
smx_context_t SIMIX_context_get_current()
{
- if (SIMIX_context_is_parallel()) {
- return smx_current_context_parallel;
- }
- else {
- return smx_current_context_serial;
- }
+ return smx_current_context;
}
/**
*/
void SIMIX_context_set_current(smx_context_t context)
{
- if (SIMIX_context_is_parallel()) {
- smx_current_context_parallel = context;
- }
- else {
- smx_current_context_serial = context;
- }
+ smx_current_context = context;
}