summaryrefslogtreecommitdiff
path: root/translate/grt/grt-signals.adb
diff options
context:
space:
mode:
authorgingold2005-11-07 23:18:35 +0000
committergingold2005-11-07 23:18:35 +0000
commit004bd818080a8090ea61bfb9cd656b01fe4541e0 (patch)
treea09472ff8de767ccd7f84d64ffc3c3fc4179bb75 /translate/grt/grt-signals.adb
parentd5888aa28f654fa58ec9f3914932885e36af3d5c (diff)
downloadghdl-004bd818080a8090ea61bfb9cd656b01fe4541e0.tar.gz
ghdl-004bd818080a8090ea61bfb9cd656b01fe4541e0.tar.bz2
ghdl-004bd818080a8090ea61bfb9cd656b01fe4541e0.zip
handle universal real div integer evaluation,
more optimizations added, multi-thread ready grt, bug fixes
Diffstat (limited to 'translate/grt/grt-signals.adb')
-rw-r--r--translate/grt/grt-signals.adb11
1 files changed, 5 insertions, 6 deletions
diff --git a/translate/grt/grt-signals.adb b/translate/grt/grt-signals.adb
index fed1788..e0376c2 100644
--- a/translate/grt/grt-signals.adb
+++ b/translate/grt/grt-signals.adb
@@ -26,6 +26,7 @@ with Grt.Rtis_Types; use Grt.Rtis_Types;
with Grt.Disp_Signals;
with Grt.Astdio;
with Grt.Stdio;
+with Grt.Threads; use Grt.Threads;
package body Grt.Signals is
function Is_Signal_Guarded (Sig : Ghdl_Signal_Ptr) return Boolean
@@ -403,11 +404,11 @@ package body Grt.Signals is
Signal_End : Ghdl_Signal_Ptr;
-- List of active signals.
- Active_List : Ghdl_Signal_Ptr;
+ Active_List : aliased Ghdl_Signal_Ptr;
-- List of signals which have projected waveforms in the future (beyond
-- the next delta cycle).
- Future_List : Ghdl_Signal_Ptr;
+ Future_List : aliased Ghdl_Signal_Ptr;
procedure Ghdl_Signal_Start_Assign (Sign : Ghdl_Signal_Ptr;
Reject : Std_Time;
@@ -430,15 +431,13 @@ package body Grt.Signals is
-- Put SIGN on the active list if the transaction is scheduled
-- for the next delta cycle.
if Sign.Link = null then
- Sign.Link := Active_List;
- Active_List := Sign;
+ Sign.Link := Grt.Threads.Atomic_Insert (Active_List'access, Sign);
end if;
else
-- AFTER > 0.
-- Put SIGN on the future list.
if Sign.Flink = null then
- Sign.Flink := Future_List;
- Future_List := Sign;
+ Sign.Flink := Grt.Threads.Atomic_Insert (Future_List'access, Sign);
end if;
end if;