SimGrid  3.18
Versatile Simulation of Distributed Systems
popping_private.hpp File Reference
#include <simgrid/simix.h>
#include <xbt/base.h>
#include <src/kernel/activity/ActivityImpl.hpp>
#include <src/kernel/activity/CommImpl.hpp>
#include <src/kernel/activity/ExecImpl.hpp>
#include <boost/intrusive_ptr.hpp>
#include "popping_enum.h"
#include "popping_accessors.hpp"

Classes

union  u_smx_scalar
 
struct  s_smx_simcall
 Represents a simcall to the kernel. More...
 
class  simgrid::simix::type< T >
 
struct  simgrid::simix::marshal_t< T >
 

Namespaces

 simgrid
 Alltoall Bruck.
 
 simgrid::simix
 

Macros

#define SIMCALL_SET_MC_VALUE(simcall, value)   ((simcall)->mc_value = (value))
 
#define SIMCALL_GET_MC_VALUE(simcall)   ((simcall)->mc_value)
 
#define SIMIX_MARSHAL(T, field)
 

Typedefs

typedef int(* simix_match_func_t) (void *, void *, simgrid::kernel::activity::CommImpl *)
 
typedef void(* simix_copy_data_func_t) (smx_activity_t, void *, size_t)
 
typedef void(* simix_clean_func_t) (void *)
 
typedef void(* FPtr) (void)
 

Functions

void SIMIX_simcall_answer (smx_simcall_t simcall)
 
void SIMIX_simcall_handle (smx_simcall_t simcall, int value)
 (in kernel mode) unpack the simcall and activate the handler More...
 
void SIMIX_simcall_exit (smx_activity_t synchro)
 
const char * SIMIX_simcall_name (e_smx_simcall_t kind)
 returns a printable string representing a simcall More...
 
void SIMIX_run_kernel (std::function< void()> const *code)
 
void SIMIX_run_blocking (std::function< void()> const *code)
 Kernel code for run_blocking. More...
 
 simgrid::simix::SIMIX_MARSHAL (char, c)
 
 simgrid::simix::SIMIX_MARSHAL (short, s)
 
 simgrid::simix::SIMIX_MARSHAL (int, i)
 
 simgrid::simix::SIMIX_MARSHAL (long, l)
 
 simgrid::simix::SIMIX_MARSHAL (unsigned char, uc)
 
 simgrid::simix::SIMIX_MARSHAL (unsigned short, us)
 
 simgrid::simix::SIMIX_MARSHAL (unsigned int, ui)
 
 simgrid::simix::SIMIX_MARSHAL (unsigned long, ul)
 
 simgrid::simix::SIMIX_MARSHAL (unsigned long long, ull)
 
 simgrid::simix::SIMIX_MARSHAL (long long, ll)
 
 simgrid::simix::SIMIX_MARSHAL (float, d)
 
 simgrid::simix::SIMIX_MARSHAL (double, d)
 
 simgrid::simix::SIMIX_MARSHAL (FPtr, fp)
 
void simgrid::simix::unmarshal (type< void >, u_smx_scalar const &simcall)
 
void simgrid::simix::unmarshal_raw (type< void >, u_smx_scalar const &simcall)
 
template<class T >
void simgrid::simix::marshal (type< T *>, u_smx_scalar &simcall, T *value)
 
template<class T >
T * simgrid::simix::unmarshal (type< T *>, u_smx_scalar const &simcall)
 
template<class T >
T * simgrid::simix::unmarshal_raw (type< T *>, u_smx_scalar const &simcall)
 
template<class T >
void simgrid::simix::marshal (type< boost::intrusive_ptr< T >>, u_smx_scalar &simcall, boost::intrusive_ptr< T > value)
 
template<class T >
boost::intrusive_ptr< T > simgrid::simix::unmarshal (type< boost::intrusive_ptr< T >>, u_smx_scalar const &simcall)
 
template<class T >
T * simgrid::simix::unmarshal_raw (type< boost::intrusive_ptr< T >>, u_smx_scalar const &simcall)
 
template<class R , class... T>
void simgrid::simix::marshal (type< R(*)(T...)>, u_smx_scalar &simcall, R(*value)(T...))
 
template<class R , class... T>
auto simgrid::simix::unmarshal (type< R(*)(T...)>, u_smx_scalar simcall) -> R(*)(T...)
 
template<class R , class... T>
auto simgrid::simix::unmarshal_raw (type< R(*)(T...)>, u_smx_scalar simcall) -> R(*)(T...)
 
template<class T >
void simgrid::simix::marshal (u_smx_scalar &simcall, T const &value)
 
template<class T >
std::remove_reference< T >::type simgrid::simix::unmarshal (u_smx_scalar &simcall)
 
template<class T >
std::remove_reference< T >::type simgrid::simix::unmarshal_raw (u_smx_scalar &simcall)
 
template<std::size_t I>
void simgrid::simix::marshalArgs (smx_simcall_t simcall)
 
template<std::size_t I, class A >
void simgrid::simix::marshalArgs (smx_simcall_t simcall, A const &a)
 
template<std::size_t I, class A , class... B>
void simgrid::simix::marshalArgs (smx_simcall_t simcall, A const &a, B const &... b)
 
template<class... A>
void simgrid::simix::marshal (smx_simcall_t simcall, e_smx_simcall_t call, A const &... a)
 Initialize the simcall. More...
 

Variables

const char * simcall_names []
 Simcalls' names (generated from src/simix/simcalls.in) More...
 

Macro Definition Documentation

◆ SIMCALL_SET_MC_VALUE

#define SIMCALL_SET_MC_VALUE (   simcall,
  value 
)    ((simcall)->mc_value = (value))

◆ SIMCALL_GET_MC_VALUE

#define SIMCALL_GET_MC_VALUE (   simcall)    ((simcall)->mc_value)

◆ SIMIX_MARSHAL

#define SIMIX_MARSHAL (   T,
  field 
)
Value:
inline void marshal(type<T>, u_smx_scalar& simcall, T value) { simcall.field = value; } \
inline T unmarshal(type<T>, u_smx_scalar const& simcall) { return simcall.field; } \
inline T unmarshal_raw(type<T>, u_smx_scalar const& simcall) \
{ /* Exactly same as unmarshal. It differs only for intrusive_ptr */ return simcall.field; }
std::remove_reference< T >::type unmarshal(u_smx_scalar &simcall)
Definition: popping_private.hpp:178
Definition: popping_private.hpp:31
const char char * value
Definition: msg.h:208
std::remove_reference< T >::type unmarshal_raw(u_smx_scalar &simcall)
Definition: popping_private.hpp:182
void marshal(smx_simcall_t simcall, e_smx_simcall_t call, A const &... a)
Initialize the simcall.
Definition: popping_private.hpp:204

Typedef Documentation

◆ simix_match_func_t

typedef int(* simix_match_func_t) (void *, void *, simgrid::kernel::activity::CommImpl *)

◆ simix_copy_data_func_t

typedef void(* simix_copy_data_func_t) (smx_activity_t, void *, size_t)

◆ simix_clean_func_t

typedef void(* simix_clean_func_t) (void *)

◆ FPtr

typedef void(* FPtr) (void)

Function Documentation

◆ SIMIX_simcall_answer()

void SIMIX_simcall_answer ( smx_simcall_t  simcall)

◆ SIMIX_simcall_handle()

void SIMIX_simcall_handle ( smx_simcall_t  simcall,
int  value 
)

(in kernel mode) unpack the simcall and activate the handler

This function is generated from src/simix/simcalls.in

◆ SIMIX_simcall_exit()

void SIMIX_simcall_exit ( smx_activity_t  synchro)

◆ SIMIX_simcall_name()

const char* SIMIX_simcall_name ( e_smx_simcall_t  kind)

returns a printable string representing a simcall

◆ SIMIX_run_kernel()

void SIMIX_run_kernel ( std::function< void()> const *  code)

◆ SIMIX_run_blocking()

void SIMIX_run_blocking ( std::function< void()> const *  code)

Kernel code for run_blocking.

The implementtion looks a lot like SIMIX_run_kernel ^^

However, this run_blocking is blocking so the process will not be woken up until SIMIX_simcall_answer(simcall)is called by the kernel. This means thatcode` is responsible for doing this.

Variable Documentation

◆ simcall_names

const char* simcall_names[]

Simcalls' names (generated from src/simix/simcalls.in)