Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Further simplify the way host failures are detected
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 26 Feb 2023 11:11:49 +0000 (12:11 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 26 Feb 2023 11:19:30 +0000 (12:19 +0100)
commitf8adb3862f0071202de6572b0322c4d3c63568ae
treef73c9fe00809c21b2e9eb5590be88382c3b3617e
parent28cc5a21ac7972001e64e9c2bd8f306fe1145cce
Further simplify the way host failures are detected

Do as it's done in links and communications: when the resource is
turned off, simply mark the actions it hosts as FAILED.

That's much simpler than the convoluted existing code, which relied on
the Host::on_state_change signal. Each activity pushed a callback to
check whether it was its host which failed. Gosh, so convoluted...

The current change is not completely applied to CpuTI model, which
seems to have another way to mark the actions as failing. So I
override CpuTI::turn_off() to not mark the actions as failing to avoid
a segfault. It's a bit lame, but CpuTI is too different, I feel lazy.
src/kernel/activity/ExecImpl.cpp
src/kernel/resource/CpuImpl.cpp
src/kernel/resource/CpuImpl.hpp
src/kernel/resource/models/cpu_ti.cpp
src/kernel/resource/models/cpu_ti.hpp