SimGrid  3.13
Versatile Simulation of Distributed Systems
UContext.cpp File Reference
#include <stdarg.h>
#include <functional>
#include <ucontext.h>
#include "xbt/parmap.h"
#include "src/simix/smx_private.h"
#include "src/simix/smx_private.hpp"
#include "src/internal_config.h"
#include "mc/mc.h"

Classes

class  simgrid::simix::UContext
 
class  simgrid::simix::SerialUContext
 
class  simgrid::simix::ParallelUContext
 
class  simgrid::simix::UContextFactory
 

Namespaces

 simgrid
 
 simgrid::simix
 

Macros

#define CTX_ADDR_LEN
 Many integers are needed to store a pointer. More...
 

Functions

static void simgrid_makecontext (ucontext_t *ucp, void(*func)(int first,...), void *arg)
 A better makecontext. More...
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY (simix_context)
 
static void smx_ctx_sysv_wrapper (int first,...)
 
XBT_PRIVATE ContextFactory * simgrid::simix::sysv_factory ()
 

Variables

static unsigned long sysv_process_index = 0
 
static simgrid::simix::UContextsysv_maestro_context
 
static bool sysv_parallel
 

Macro Definition Documentation

#define CTX_ADDR_LEN
Value:
(sizeof(void*) / sizeof(int) + \
!!(sizeof(void*) % sizeof(int)))

Many integers are needed to store a pointer.

This is a bit paranoid about sizeof(smx_ctx_sysv_t) not being a multiple of sizeof(int), but it doesn't harm.

Function Documentation

static void simgrid_makecontext ( ucontext_t *  ucp,
void(*)(int first,...)  func,
void arg 
)
static

A better makecontext.

Makecontext expects integer arguments, we the context variable is decomposed into a serie of integers and each integer is passed as argument to makecontext.

XBT_LOG_EXTERNAL_DEFAULT_CATEGORY ( simix_context  )
static void smx_ctx_sysv_wrapper ( int  first,
  ... 
)
static

Variable Documentation

unsigned long sysv_process_index = 0
static
simgrid::simix::UContext* sysv_maestro_context
static
bool sysv_parallel
static