Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move an example from teshsuite to examples
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 13 Mar 2017 00:12:52 +0000 (01:12 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 13 Mar 2017 00:12:52 +0000 (01:12 +0100)
.gitignore
examples/msg/CMakeLists.txt
examples/msg/process-join/process-join.c [moved from teshsuite/msg/process_join/process_join.c with 80% similarity]
examples/msg/process-join/process-join.tesh [moved from teshsuite/msg/process_join/process_join.tesh with 94% similarity]
teshsuite/msg/CMakeLists.txt

index 6b2f1cc..feeb1ee 100644 (file)
@@ -147,7 +147,12 @@ examples/msg/io-file-unlink/io-file-unlink
 examples/msg/io-remote/io-remote
 examples/msg/io-storage/io-storage
 examples/msg/platform-failures/platform-failures
+examples/msg/process-create/process-create
 examples/msg/process-kill/process-kill
+examples/msg/process-join/process-join
+examples/msg/process-migration/process-migration
+examples/msg/process-startkilltime/process-startkilltime
+examples/msg/process-suspend/process-suspend
 examples/msg/app-masterworker/app-masterworker
 examples/msg/mc/bugged1
 examples/msg/mc/bugged1_liveness
@@ -164,7 +169,6 @@ examples/msg/mc/test/snapshot_comparison2
 examples/msg/mc/test/snapshot_comparison3
 examples/msg/mc/test/snapshot_comparison4
 examples/msg/mc/test/snapshot_comparison5
-examples/msg/process-migration/process-migration
 examples/msg/ms.trace
 examples/msg/network-ns3/network-ns3
 examples/msg/app-pmm/app-pmm
@@ -175,9 +179,6 @@ examples/msg/synchro-semaphore/synchro-semaphore
 examples/msg/app-pingpong/app-pingpong
 examples/msg/maestro-set/maestro-set
 examples/msg/simulation.trace
-examples/msg/process-create/process-create
-examples/msg/process-startkilltime/process-startkilltime
-examples/msg/process-suspend/process-suspend
 examples/msg/app-token-ring/app-token-ring
 examples/msg/trace-categories/trace-categories
 examples/msg/trace-route-user-variables/trace-route-user-variables
@@ -248,7 +249,6 @@ teshsuite/msg/host_on_off_recv/host_on_off_recv
 teshsuite/msg/host_on_off_wait/host_on_off_wait
 teshsuite/msg/listen_async/listen_async
 teshsuite/msg/pid/pid
-teshsuite/msg/process_join/process_join
 teshsuite/msg/process/process
 teshsuite/msg/storage_client_server/storage_client_server
 teshsuite/msg/task_destroy_cancel/task_destroy_cancel
index f25ab08..ba41822 100644 (file)
@@ -2,7 +2,8 @@
 foreach(x actions-comm actions-storage app-masterworker app-pingpong app-pmm app-token-ring async-yield async-wait async-waitall 
           async-waitany cloud-capping cloud-masterworker cloud-migration cloud-simple cloud-two-tasks
           dht-chord dht-pastry energy-consumption energy-onoff energy-pstate energy-ptask energy-vm platform-failures 
-          io-file io-remote io-storage task-priority process-create process-daemon process-kill process-migration process-suspend 
+          io-file io-remote io-storage task-priority 
+         process-create process-daemon process-join process-kill process-migration process-suspend 
           platform-properties process-startkilltime synchro-semaphore trace-categories 
           trace-route-user-variables trace-link-user-variables trace-masterworker trace-platform 
           trace-process-migration trace-host-user-variables)
@@ -96,8 +97,8 @@ set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/actio
 foreach(x actions-comm actions-storage app-bittorrent app-chainsend app-masterworker app-pingpong app-token-ring
           async-yield async-wait async-waitall async-waitany cloud-capping cloud-masterworker cloud-migration cloud-simple 
           cloud-two-tasks dht-chord dht-pastry dht-kademlia platform-failures io-file io-remote io-storage task-priority 
-          process-create process-daemon process-kill process-migration process-suspend platform-properties synchro-semaphore 
-          process-startkilltime)
+          process-create process-daemon process-join process-kill process-migration process-startkilltime process-suspend
+         platform-properties synchro-semaphore)
   ADD_TESH_FACTORIES(msg-${x} "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/${x} ${x}.tesh)
 endforeach()
 
similarity index 80%
rename from teshsuite/msg/process_join/process_join.c
rename to examples/msg/process-join/process-join.c
index a19aa05..282c342 100644 (file)
@@ -8,7 +8,7 @@
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
 
-static int slave(int argc, char *argv[])
+static int slave(int argc, charargv[])
 {
   XBT_INFO("Slave started");
   MSG_process_sleep(3);
@@ -16,22 +16,22 @@ static int slave(int argc, char *argv[])
   return 0;
 }
 
-static int master(int argc, char *argv[])
+static int master(int argc, charargv[])
 {
   msg_process_t process;
 
   XBT_INFO("Start slave");
-  process =  MSG_process_create("slave from master", slave, NULL, MSG_host_self());
+  process = MSG_process_create("slave from master", slave, NULL, MSG_host_self());
   XBT_INFO("Join the slave (timeout 2)");
   MSG_process_join(process, 2);
 
   XBT_INFO("Start slave");
-  process =  MSG_process_create("slave from master", slave, NULL, MSG_host_self());
+  process = MSG_process_create("slave from master", slave, NULL, MSG_host_self());
   XBT_INFO("Join the slave (timeout 4)");
   MSG_process_join(process, 4);
 
   XBT_INFO("Start slave");
-  process =  MSG_process_create("slave from master", slave, NULL, MSG_host_self());
+  process = MSG_process_create("slave from master", slave, NULL, MSG_host_self());
   XBT_INFO("Join the slave (timeout 2)");
   MSG_process_join(process, 2);
 
@@ -50,7 +50,7 @@ static int master(int argc, char *argv[])
   return 0;
 }
 
-int main(int argc, char *argv[])
+int main(int argc, charargv[])
 {
   msg_error_t res;
 
similarity index 94%
rename from teshsuite/msg/process_join/process_join.tesh
rename to examples/msg/process-join/process-join.tesh
index 33a956d..5147a79 100644 (file)
@@ -1,5 +1,5 @@
 
-$ ./process_join$EXEEXT ${srcdir:=.}/../../../examples/platforms/small_platform.xml
+$ ./process-join$EXEEXT ${srcdir:=.}/small_platform.xml
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Start slave
 > [Tremblay:slave from master:(2) 0.000000] [msg_test/INFO] Slave started
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Join the slave (timeout 2)
index 989b8bd..ba63986 100644 (file)
@@ -1,5 +1,5 @@
 foreach(x concurrent_rw get_sender host_on_off host_on_off_recv host_on_off_processes host_on_off_wait listen_async pid
-          process process_join storage_client_server trace_integration)
+          process storage_client_server trace_integration)
   add_executable       (${x}  ${x}/${x}.c)
   target_link_libraries(${x}  simgrid)
   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
@@ -33,6 +33,6 @@ set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration
                                    ${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp2.5-hbp1.5.xml    PARENT_SCOPE)
 
 foreach(x concurrent_rw get_sender host_on_off host_on_off_processes host_on_off_recv host_on_off_wait listen_async pid
-          process process_join storage_client_server task_destroy_cancel trace_integration)
+          process storage_client_server task_destroy_cancel trace_integration)
   ADD_TESH_FACTORIES(tesh-msg-${x} "thread;boost;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x} --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x}/${x}.tesh)
 endforeach()