SimGrid  3.16
Versatile Simulation of Distributed Systems
ContextUnix.cpp File Reference
#include <ucontext.h>
#include "src/simix/ActorImpl.hpp"
#include "src/simix/smx_private.h"
#include "xbt/parmap.h"
#include "mc/mc.h"
#include "src/mc/mc_ignore.h"

Classes

class  simgrid::kernel::context::UContext
 
class  simgrid::kernel::context::SerialUContext
 
class  simgrid::kernel::context::ParallelUContext
 
class  simgrid::kernel::context::UContextFactory
 

Namespaces

 simgrid
 Alltoall Bruck.
 
 simgrid::kernel
 
 simgrid::kernel::context
 

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,...)
 
ContextFactory * simgrid::kernel::context::sysv_factory ()
 

Variables

static unsigned long sysv_process_index = 0
 
static simgrid::kernel::context::UContextsysv_maestro_context
 
static bool sysv_parallel
 

Macro Definition Documentation

◆ CTX_ADDR_LEN

#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

◆ simgrid_makecontext()

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()

XBT_LOG_EXTERNAL_DEFAULT_CATEGORY ( simix_context  )

◆ smx_ctx_sysv_wrapper()

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

Variable Documentation

◆ sysv_process_index

unsigned long sysv_process_index = 0
static

◆ sysv_maestro_context

simgrid::kernel::context::UContext* sysv_maestro_context
static

◆ sysv_parallel

bool sysv_parallel
static