aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-11-19 09:24:12 +0100
committerTristan Gingold <tgingold@free.fr>2014-11-19 09:24:12 +0100
commitf32d6d8f97f9a96945ba819fc7936b19dea7563e (patch)
tree368a5f36bc1d18573200da7b48ba29dd295c1a47 /src
parent5013e9842bce26cefca914ddeaff78eb19a2bae9 (diff)
downloadghdl-f32d6d8f97f9a96945ba819fc7936b19dea7563e.tar.gz
ghdl-f32d6d8f97f9a96945ba819fc7936b19dea7563e.tar.bz2
ghdl-f32d6d8f97f9a96945ba819fc7936b19dea7563e.zip
Add comments.
Diffstat (limited to 'src')
-rw-r--r--src/grt/grt-processes.adb7
-rw-r--r--src/grt/grt-processes.ads3
-rw-r--r--src/grt/grt-signals.ads12
3 files changed, 20 insertions, 2 deletions
diff --git a/src/grt/grt-processes.adb b/src/grt/grt-processes.adb
index 64db682e2..5f0810786 100644
--- a/src/grt/grt-processes.adb
+++ b/src/grt/grt-processes.adb
@@ -301,18 +301,25 @@ package body Grt.Processes is
Prev => null,
Sig => Sig,
Chain => Proc.Sensitivity);
+
+ -- Put EL on SIG event list.
if Sig.Event_List /= null and then Sig.Event_List.Dynamic then
Sig.Event_List.Prev := El;
end if;
Sig.Event_List := El;
+
+ -- Put EL on PROC sensitivity list.
Proc.Sensitivity := El;
end Ghdl_Process_Wait_Add_Sensitivity;
procedure Update_Process_First_Timeout (Proc : Process_Acc) is
begin
+ -- Update Process_First_Timeout
if Proc.Timeout < Process_First_Timeout then
Process_First_Timeout := Proc.Timeout;
end if;
+
+ -- Append PROC on Process_Timeout_Chain.
Proc.Timeout_Chain_Next := Process_Timeout_Chain;
Proc.Timeout_Chain_Prev := null;
if Process_Timeout_Chain /= null then
diff --git a/src/grt/grt-processes.ads b/src/grt/grt-processes.ads
index 22326eb5e..534a129ad 100644
--- a/src/grt/grt-processes.ads
+++ b/src/grt/grt-processes.ads
@@ -108,8 +108,11 @@ package Grt.Processes is
-- Resume a process.
procedure Resume_Process (Proc : Process_Acc);
+ -- Incomplete wait statement:
+
-- Wait without timeout or sensitivity: wait;
procedure Ghdl_Process_Wait_Exit;
+
-- Wait for a timeout (without sensitivity): wait for X;
procedure Ghdl_Process_Wait_Timeout (Time : Std_Time);
diff --git a/src/grt/grt-signals.ads b/src/grt/grt-signals.ads
index d792f1634..0b69e6051 100644
--- a/src/grt/grt-signals.ads
+++ b/src/grt/grt-signals.ads
@@ -113,10 +113,18 @@ package Grt.Signals is
case Dynamic is
when True =>
- -- For a non-sensitized process.
- -- Previous action (to speed-up remove from the chain).
+ -- For a non-sensitized process. Action_List elements are put
+ -- in two lists: the Event_List of signals (so that the process
+ -- can be resumed in case of event on the signal), and the
+ -- Sensitivity list of the process (so that the chain can be
+ -- removed once the process is resumed).
+ -- Components Next and Prev are for the Event_List of signal Sig.
+ -- Component Chain is for the Sensitivity list of process Proc.
+
+ -- Previous action (to speed-up removing from the chain).
Prev : Action_List_Acc;
+ -- Signal (to remove this record from the signal event list).
Sig : Ghdl_Signal_Ptr;
-- Chain of signals for the process.