Skip to content

Commit 8616050

Browse files
committed
Fix immediate after callbacks not notifying about state change
1 parent 8164ce4 commit 8616050

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

RELEASENOTES-1.4.docu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,4 +526,7 @@
526526
<build-id _6="6287" _7="7012"><add-note> Fixed a bug where overlapping
527527
registers would not be rejected if they were part of a bank within a group
528528
or subdevice.</add-note></build-id>
529+
<build-id _6="next" _7="next"><add-note> Fixed a bug where executed callbacks
530+
posted via immediate after statements would not trigger the device state
531+
change notifier.</add-note></build-id>
529532
</rn>

py/dml/c_backend.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,6 +1222,7 @@ def generate_immediate_after_callbacks(device):
12221222
indices_lit = 'indices' if info.dimensions else None
12231223
args_lit = 'args' if info.args_type else None
12241224
info.generate_callback_call(indices_lit, args_lit)
1225+
output_dml_state_change('_dev')
12251226
out('}\n\n', preindent = -1)
12261227
splitting_point()
12271228

test/1.4/misc/T_notify_state.dml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,16 @@ attribute ev is write_only_attr {
100100
}
101101
}
102102

103+
attribute immediate_after is write_only_attr {
104+
param type = "n";
105+
method event() {
106+
log info, 1: "Immediate after triggered";
107+
}
108+
method set(attr_value_t val) throws default {
109+
after: event();
110+
}
111+
}
112+
103113
implement signal {
104114
method signal_raise() {
105115
log info, 1: "Interface method called";

test/1.4/misc/T_notify_state.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,11 @@
3939
SIM_notify(obj, SIM_notifier_type("statically-exported-entry"))
4040

4141
stest.expect_equal(obj.count, 7)
42+
43+
obj.immediate_after = None
44+
45+
stest.expect_equal(obj.count, 8)
46+
47+
SIM_process_pending_work()
48+
49+
stest.expect_equal(obj.count, 9)

0 commit comments

Comments
 (0)