Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename a MSG example
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 27 May 2017 15:34:21 +0000 (17:34 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 27 May 2017 15:34:21 +0000 (17:34 +0200)
examples/msg/CMakeLists.txt
examples/msg/README.doc
examples/msg/async-yield/async-yield.tesh [deleted file]
examples/msg/process-yield/process-yield.c [moved from examples/msg/async-yield/async-yield.c with 100% similarity]
examples/msg/process-yield/process-yield.tesh [new file with mode: 0644]
examples/msg/process-yield/process-yield_d.xml [moved from examples/msg/async-yield/async-yield_d.xml with 100% similarity]

index 5eb428e..001abed 100644 (file)
@@ -1,9 +1,10 @@
 # C examples
-foreach(x actions-comm actions-storage app-masterworker app-pingpong app-token-ring async-yield async-wait async-waitall 
+foreach(x actions-comm actions-storage app-masterworker app-pingpong app-token-ring 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 
-          plugin-hostload process-create process-daemon process-join process-kill process-migration process-suspend 
+          plugin-hostload 
+         process-create process-daemon process-join process-kill process-migration process-suspend process-yield 
           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)
@@ -50,8 +51,8 @@ foreach (file answer dht-kademlia node routing_table task)
   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.c  ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.h)
 endforeach()
 
-foreach (file actions-comm actions-storage app-bittorrent app-chainsend app-masterworker app-pingpong async-yield async-wait
-         async-waitall async-waitany dht-chord dht-kademlia io-remote platform-properties
+foreach (file actions-comm actions-storage app-bittorrent app-chainsend app-masterworker app-pingpong async-wait
+         async-waitall async-waitany dht-chord dht-kademlia io-remote platform-properties process-yield 
          task-priority)
   set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/${file}/${file}_d.xml)
 endforeach()
@@ -95,9 +96,9 @@ set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/actio
                                   ${CMAKE_CURRENT_SOURCE_DIR}/process-startkilltime/start_kill_d.xml       PARENT_SCOPE)
 
 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 
+          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-join process-kill process-migration process-startkilltime process-suspend
+          process-create process-daemon process-join process-kill process-migration process-startkilltime process-suspend process-yield
          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()
index 2f586f0..522000b 100644 (file)
@@ -65,12 +65,6 @@ shipped in the archive:
    until one activity of the set completes, no matter which terminates
    first.
    
- - <b>Yielding to other processes</b>.
-   @ref examples/msg/async-yield/async-yield.c\n
-   The @ref MSG_process_yield function interrupts the execution of the
-   current process, leaving a chance to run to the other processes
-   that are ready to run at the exact same timestamp
-
 @section msg_ex_process Acting on Processes
 
   - <b>Creating processes</b>. 
@@ -91,6 +85,12 @@ shipped in the archive:
     @ref examples/msg/process-migration/process-migration.c \n
     Processes can move or be moved from a host to another with the @ref MSG_process_migrate function.
     
+  - <b>Yielding to other processes</b>.
+    @ref examples/msg/process-yield/process-yield.c\n
+    The @ref MSG_process_yield function interrupts the execution of the
+    current process, leaving a chance to run to the other processes
+    that are ready to run at the exact same timestamp
+
   - <b>Controling the process life cycle from the XML</b>.
     @ref examples/msg/process-startkilltime/process-startkilltime.c \n
     You can specify a start time and a kill time in the deployment
diff --git a/examples/msg/async-yield/async-yield.tesh b/examples/msg/async-yield/async-yield.tesh
deleted file mode 100644 (file)
index e5aef16..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#! ./tesh
-
-$ $SG_TEST_EXENV ${bindir:=.}/async-yield ${srcdir:=.}/small_platform_fatpipe.xml ${srcdir:=.}/../msg/async-yield/async-yield_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [  0.000000] (1:yielder@Tremblay) I yielded 10 times. Goodbye now!
-> [  0.000000] (2:yielder@Ruby) I yielded 15 times. Goodbye now!
diff --git a/examples/msg/process-yield/process-yield.tesh b/examples/msg/process-yield/process-yield.tesh
new file mode 100644 (file)
index 0000000..e39b2b9
--- /dev/null
@@ -0,0 +1,5 @@
+#! ./tesh
+
+$ $SG_TEST_EXENV ${bindir:=.}/process-yield ${srcdir:=.}/small_platform_fatpipe.xml ${srcdir:=.}/../msg/process-yield/process-yield_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (1:yielder@Tremblay) I yielded 10 times. Goodbye now!
+> [  0.000000] (2:yielder@Ruby) I yielded 15 times. Goodbye now!