SimGrid  3.13
Versatile Simulation of Distributed Systems
RawContext.cpp File Reference

Fast context switching inspired from SystemV ucontexts. More...

#include <math.h>
#include <utility>
#include <functional>
#include "src/internal_config.h"
#include "xbt/log.h"
#include "xbt/parmap.h"
#include "xbt/dynar.h"
#include "smx_private.h"
#include "smx_private.hpp"
#include "mc/mc.h"

Classes

class  simgrid::simix::RawContext
 
class  simgrid::simix::RawContextFactory
 

Namespaces

 simgrid
 
 simgrid::simix
 

Typedefs

typedef void(* rawctx_entry_point_t) (void *)
 
typedef voidraw_stack_t
 

Functions

 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY (simix_context)
 
ContextFactory * simgrid::simix::raw_factory ()
 
raw_stack_t raw_makecontext (void *malloced_stack, int stack_size, rawctx_entry_point_t entry_point, void *arg)
 
void raw_swapcontext (raw_stack_t *old, raw_stack_t new_context)
 

Variables

static unsigned long raw_process_index = 0
 
static simgrid::simix::RawContextraw_maestro_context
 
static bool raw_context_parallel = false
 

Detailed Description

Fast context switching inspired from SystemV ucontexts.

In contrast to System V context, it does not touch the signal mask which avoids making a system call (at least on Linux).

Typedef Documentation

typedef void(* rawctx_entry_point_t) (void *)
typedef void* raw_stack_t

Function Documentation

XBT_LOG_EXTERNAL_DEFAULT_CATEGORY ( simix_context  )
raw_stack_t raw_makecontext ( void malloced_stack,
int  stack_size,
rawctx_entry_point_t  entry_point,
void arg 
)
void raw_swapcontext ( raw_stack_t old,
raw_stack_t  new_context 
)

Variable Documentation

unsigned long raw_process_index = 0
static
simgrid::simix::RawContext* raw_maestro_context
static
bool raw_context_parallel = false
static