mark logic critical sections in tables
This commit is contained in:
		| @@ -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 = {}, | ||||||
|   | |||||||
| @@ -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 | ||||||
|   | |||||||
| @@ -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, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Redo0
					Redo0