Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar: kill an unused type and reduce the visibility of another one
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 4 Nov 2018 11:54:44 +0000 (12:54 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 11 Nov 2018 01:59:33 +0000 (02:59 +0100)
include/simgrid/simix.h
include/simgrid/simix.hpp
src/kernel/context/Context.hpp
src/simix/smx_network.cpp

index 2a15302..210c3b5 100644 (file)
@@ -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;
index 341f54f..4548f6f 100644 (file)
@@ -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<std::string, std::string>* 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<std::string, std::string>*,
-    /* 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<std::string, std::string>* properties);
 
index 50f140c..8b15744 100644 (file)
@@ -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 <csignal>
 
+/* Process creation/destruction callbacks */
+typedef void (*void_pfn_smxprocess_t)(smx_actor_t);
+
 namespace simgrid {
 namespace kernel {
 namespace context {
index 464c6dd..d69d580 100644 (file)
@@ -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"