aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--STYLE4
-rw-r--r--src/grt/grt-processes.adb7
-rw-r--r--src/grt/grt-processes.ads3
-rw-r--r--src/grt/grt-signals.ads12
4 files changed, 24 insertions, 2 deletions
diff --git a/STYLE b/STYLE
index 5ecf98509..170703956 100644
--- a/STYLE
+++ b/STYLE
@@ -53,6 +53,10 @@ vs
function Translate_Static_Range_Dir (Expr : Iir) return O_Cnode is
begin
+* Generic instantiation: put the generic actual part on a new line:
+ procedure Free is new Ada.Unchecked_Deallocation
+ (Action_List, Action_List_Acc);
+
* For if/then statement:
1) 'then' on the same line:
if Get_Expr_Staticness (Decl) = Locally then
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.