actor-lifetime actor-migration actor-suspend actor-yield
app-chainsend app-pingpong app-token-ring
async-ready async-wait async-waitany async-waitall async-waituntil
- barrier
cloud-capping cloud-migration cloud-simple
energy-exec energy-boot energy-link energy-vm
engine-filtering
exec-async exec-basic exec-dvfs exec-monitor exec-ptask exec-remote
io-async io-file-system io-file-remote io-storage-raw
- mutex
platform-failures platform-properties plugin-hostload
replay-comm replay-storage
routing-get-clusters
+ synchro-barrier synchro-mutex
trace-platform)
add_executable (s4u-${example} ${example}/s4u-${example}.cpp)
target_link_libraries(s4u-${example} simgrid)
actor-lifetime actor-migration actor-suspend actor-yield
app-bittorrent app-chainsend app-masterworkers app-pingpong app-token-ring
async-ready async-wait async-waitall async-waitany async-waituntil
- barrier
cloud-capping cloud-migration cloud-simple
dht-chord dht-kademlia
energy-exec energy-boot energy-link energy-vm
engine-filtering
exec-async exec-basic exec-dvfs exec-monitor exec-ptask exec-remote
- platform-properties plugin-hostload mutex # FIXME: platform-failures is disabled
+ platform-properties plugin-hostload # FIXME: platform-failures is disabled
io-async io-file-system io-file-remote io-storage-raw
replay-comm replay-storage
routing-get-clusters
+ synchro-barrier synchro-mutex
)
ADD_TESH_FACTORIES(s4u-${example} "thread;ucontext;raw;boost"
--setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example}
- **Mutex:**
Shows how to use simgrid::s4u::Mutex synchronization objects.
- |br| `examples/s4u/mutex/s4u-mutex.cpp <https://framagit.org/simgrid/simgrid/tree/master/examples/s4u/mutex/s4u-mutex.cpp>`_
+ |br| `examples/s4u/synchro-mutex/s4u-synchro-mutex.cpp <https://framagit.org/simgrid/simgrid/tree/master/examples/s4u/synchro-mutex/s4u-synchro-mutex.cpp>`_
- **Barrier:**
Shows how to use simgrid::s4u::Barrier synchronization objects.
- |br| `examples/s4u/barrier/s4u-barrier.cpp <https://framagit.org/simgrid/simgrid/tree/master/examples/s4u/barrier/s4u-barrier.cpp>`_
+ |br| `examples/s4u/synchro-barrier/s4u-synchro-barrier.cpp <https://framagit.org/simgrid/simgrid/tree/master/examples/s4u/synchro-barrier/s4u-synchro-barrier.cpp>`_
.............................
Interacting with the platform
#!/usr/bin/env tesh
-$ $SG_TEST_EXENV ${bindir:=.}/s4u-barrier 1
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-synchro-barrier 1
> [Tremblay:master:(1) 0.000000] [s4u_test/INFO] Spawning 0 workers
> [Tremblay:master:(1) 0.000000] [s4u_test/INFO] Waiting on the barrier
> [Tremblay:master:(1) 0.000000] [s4u_test/INFO] Bye
-$ $SG_TEST_EXENV ${bindir:=.}/s4u-barrier 2
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-synchro-barrier 2
> [Tremblay:master:(1) 0.000000] [s4u_test/INFO] Spawning 1 workers
> [Jupiter:worker:(2) 0.000000] [s4u_test/INFO] Waiting on the barrier
> [Tremblay:master:(1) 0.000000] [s4u_test/INFO] Waiting on the barrier
> [Tremblay:master:(1) 0.000000] [s4u_test/INFO] Bye
> [Jupiter:worker:(2) 0.000000] [s4u_test/INFO] Bye
-$ $SG_TEST_EXENV ${bindir:=.}/s4u-barrier 3
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-synchro-barrier 3
> [Tremblay:master:(1) 0.000000] [s4u_test/INFO] Spawning 2 workers
> [Jupiter:worker:(2) 0.000000] [s4u_test/INFO] Waiting on the barrier
> [Jupiter:worker:(3) 0.000000] [s4u_test/INFO] Waiting on the barrier
> [Jupiter:worker:(2) 0.000000] [s4u_test/INFO] Bye
> [Jupiter:worker:(3) 0.000000] [s4u_test/INFO] Bye
-$ $SG_TEST_EXENV ${bindir:=.}/s4u-barrier 10
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-synchro-barrier 10
> [Tremblay:master:(1) 0.000000] [s4u_test/INFO] Spawning 9 workers
> [Jupiter:worker:(2) 0.000000] [s4u_test/INFO] Waiting on the barrier
> [Jupiter:worker:(3) 0.000000] [s4u_test/INFO] Waiting on the barrier
#!/usr/bin/env tesh
-$ $SG_TEST_EXENV ${bindir:=.}/s4u-mutex
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-synchro-mutex
> [Jupiter:worker:(2) 0.000000] [s4u_test/INFO] Hello s4u, I'm ready to compute after a lock_guard
> [Jupiter:worker:(2) 0.000000] [s4u_test/INFO] I'm done, good bye
> [Tremblay:worker:(3) 0.000000] [s4u_test/INFO] Hello s4u, I'm ready to compute after a regular lock