1 /* Copyright (c) 2007-2010, 2012-2015. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #ifndef _POPPING_PRIVATE_H
8 #define _POPPING_PRIVATE_H
14 /********************************* Simcalls *********************************/
15 XBT_PUBLIC_DATA(const char*) simcall_names[]; /* Name of each simcall */
17 #include "popping_enum.h" /* Definition of e_smx_simcall_t, with one value per simcall */
18 #include "src/mc/mc_forward.h" /* Definition of mc_snapshot_t, used by one simcall */
20 typedef int (*simix_match_func_t)(void *, void *, smx_synchro_t);
21 typedef void (*simix_copy_data_func_t)(smx_synchro_t, void*, size_t);
22 typedef void (*simix_clean_func_t)(void *);
23 typedef void (*FPtr)(void); // Hide the ugliness
25 /* Pack all possible scalar types in an union */
47 * \brief Represents a simcall to the kernel.
49 typedef struct s_smx_simcall {
53 union u_smx_scalar args[11];
54 union u_smx_scalar result;
55 } s_smx_simcall_t, *smx_simcall_t;
57 #define SIMCALL_SET_MC_VALUE(simcall, value) ((simcall)->mc_value = (value))
58 #define SIMCALL_GET_MC_VALUE(simcall) ((simcall)->mc_value)
60 #include "popping_accessors.h"
62 /******************************** General *************************************/
64 XBT_PRIVATE void SIMIX_simcall_answer(smx_simcall_t);
65 XBT_PRIVATE void SIMIX_simcall_handle(smx_simcall_t, int);
66 XBT_PRIVATE void SIMIX_simcall_exit(smx_synchro_t);
67 XBT_PRIVATE const char *SIMIX_simcall_name(e_smx_simcall_t kind);