]> Kevux Git Server - fll/commit
Bugfix: rules not properly handling status.
authorKevin Day <thekevinday@gmail.com>
Sun, 11 Apr 2021 21:53:54 +0000 (16:53 -0500)
committerKevin Day <thekevinday@gmail.com>
Sun, 11 Apr 2021 21:53:54 +0000 (16:53 -0500)
commitccebf74487480a9dd047a8a45b2cf5ec9294010b
treecfba6af1a3756b03431d0b5e00965dc42c605e07
parentc442696f8313fbb511fa2f5693d44031d881fd9f
Bugfix: rules not properly handling status.

The status F_known_not was incorrectly being treated as busy.
Make sure to guarantee lock and then unlock of the process_other lock (read lock) to prevent execution of dependent rule while analyzing state of dependent rule.

Read the rule's status after executing from the rule in the rules array and not on the process.
The rules on the rules array is updated after execution but the process is not guaranteed this.
The status of process is generally reserved for the process to manage the status and not to represent the rule status.

Expanded the example serial execution test entries and rules.
Add a new alternative serial so that one uses normal execution and other uses dependent execution (execution is executed by something depending on it rather than being directly started via the entry).
15 files changed:
level_3/controller/c/private-rule.c
level_3/controller/data/settings/example/entries/serial-alternate.entry [new file with mode: 0644]
level_3/controller/data/settings/example/entries/serial.entry
level_3/controller/data/settings/example/rules/asynchronous/sleep_1.rule
level_3/controller/data/settings/example/rules/asynchronous/sleep_10.rule
level_3/controller/data/settings/example/rules/asynchronous/sleep_2.rule
level_3/controller/data/settings/example/rules/asynchronous/sleep_3.rule
level_3/controller/data/settings/example/rules/asynchronous/sleep_5.rule
level_3/controller/data/settings/example/rules/asynchronous/sleep_8.rule
level_3/controller/data/settings/example/rules/serial/s_1.rule
level_3/controller/data/settings/example/rules/serial/s_2.rule
level_3/controller/data/settings/example/rules/serial/s_3.rule
level_3/controller/data/settings/example/rules/serial/s_4.rule
level_3/controller/data/settings/example/rules/serial/s_5.rule
level_3/controller/data/settings/example/rules/serial/s_6.rule