From: Martin Quinson Date: Sun, 4 Nov 2018 11:54:44 +0000 (+0100) Subject: please sonar: kill an unused type and reduce the visibility of another one X-Git-Tag: v3_22~812 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ca3a892303ccd7bfa16360486ee43bb0f41154f0 please sonar: kill an unused type and reduce the visibility of another one --- diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index 2a15302791..210c3b5052 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -60,10 +60,6 @@ typedef enum { /** @} */ /******************************* Networking ***********************************/ - -/* Process creation/destruction callbacks */ -typedef void (*void_pfn_smxprocess_t) (smx_actor_t); - extern unsigned smx_context_stack_size; extern int smx_context_stack_size_was_set; extern unsigned smx_context_guard_size; diff --git a/include/simgrid/simix.hpp b/include/simgrid/simix.hpp index 341f54fbca..4548f6f1e7 100644 --- a/include/simgrid/simix.hpp +++ b/include/simgrid/simix.hpp @@ -77,24 +77,6 @@ XBT_PUBLIC void register_function(std::string name, ActorCodeFactory factory); } } -/* - * Type of function that creates a process. - * The function must accept the following parameters: - * void* process: the process created will be stored there - * const char *name: a name for the object. It is for user-level information and can be NULL - * xbt_main_func_t code: is a function describing the behavior of the process - * void *data: data a pointer to any data one may want to attach to the new object. - * sg_host_t host: the location where the new process is executed - * int argc, char **argv: parameters passed to code - * std::map* props: properties - */ -typedef smx_actor_t (*smx_creation_func_t)( - /* name */ std::string, simgrid::simix::ActorCode code, - /* userdata */ void*, - /* hostname */ sg_host_t, - /* props */ std::unordered_map*, - /* parent_process */ smx_actor_t); - XBT_PUBLIC smx_actor_t simcall_process_create(std::string name, simgrid::simix::ActorCode code, void* data, sg_host_t host, std::unordered_map* properties); diff --git a/src/kernel/context/Context.hpp b/src/kernel/context/Context.hpp index 50f140cfbc..8b15744884 100644 --- a/src/kernel/context/Context.hpp +++ b/src/kernel/context/Context.hpp @@ -6,11 +6,15 @@ #ifndef SIMGRID_KERNEL_CONTEXT_CONTEXT_HPP #define SIMGRID_KERNEL_CONTEXT_CONTEXT_HPP +#include "simgrid/forward.h" #include "src/internal_config.h" -#include "src/simix/smx_network_private.hpp" +#include "src/kernel/activity/ActivityImpl.hpp" #include +/* Process creation/destruction callbacks */ +typedef void (*void_pfn_smxprocess_t)(smx_actor_t); + namespace simgrid { namespace kernel { namespace context { diff --git a/src/simix/smx_network.cpp b/src/simix/smx_network.cpp index 464c6dd3b3..d69d5808ec 100644 --- a/src/simix/smx_network.cpp +++ b/src/simix/smx_network.cpp @@ -7,6 +7,7 @@ #include "simgrid/Exception.hpp" #include "src/kernel/activity/MailboxImpl.hpp" #include "src/mc/mc_replay.hpp" +#include "src/simix/smx_network_private.hpp" #include "src/simix/smx_private.hpp" #include "src/surf/cpu_interface.hpp" #include "src/surf/network_interface.hpp"