mark logic critical sections in tables

This commit is contained in:
Redo0 2021-06-05 19:38:45 -05:00
parent 00dc81948d
commit bfa1190cfe
3 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,7 @@ Gate = {}
function Gate.new(objref, definition) function Gate.new(objref, definition)
local o = { local o = {
-- Logic Critical
in_queue = 0, in_queue = 0,
logic = definition.logic, logic = definition.logic,
ports = {}, ports = {},

View File

@ -5,6 +5,7 @@ Group = {}
function Group.new() function Group.new()
local o = { local o = {
-- Logic Critical
state = 0, state = 0,
state_num = 0, state_num = 0,
in_queue = 0, in_queue = 0,
@ -193,6 +194,7 @@ function Group.setstate(group, state)
end end
end end
-- Logic Critical
function Group.update(group) function Group.update(group)
Group.setstate(group, group.state_num>0 and 1 or 0) Group.setstate(group, group.state_num>0 and 1 or 0)
end end

View File

@ -20,7 +20,6 @@ Port = {}
function Port.new(type, direction, position, causeupdate, idx, gate) function Port.new(type, direction, position, causeupdate, idx, gate)
local o = { local o = {
group = nil, group = nil,
type = type, type = type,
direction = direction, direction = direction,
position = position, position = position,