Commit c208dc2d authored by yoogx's avatar yoogx

* (Get_Core_Id): defend again situation where a thread has no

          container process
parent 8e82cddc
...@@ -4026,17 +4026,19 @@ package body Ocarina.Backends.Utils is ...@@ -4026,17 +4026,19 @@ package body Ocarina.Backends.Utils is
function Get_Core_Id (D : Node_Id) return Unsigned_Long_Long is function Get_Core_Id (D : Node_Id) return Unsigned_Long_Long is
pragma Assert (Is_Thread (D)); pragma Assert (Is_Thread (D));
Core_Id : Unsigned_Long_Long; Core_Id : Unsigned_Long_Long := 0;
begin begin
-- First, we check the container process is associated to a -- First, we check the container process is associated to a
-- core. This is the case when we want to allocate one process -- core. This is the case when we want to allocate one process
-- to a core. -- to a core.
Core_Id := if Present (Get_Container_Process (D)) then
Properties.Get_Core_Id Core_Id :=
(Get_Bound_Processor Properties.Get_Core_Id
(Corresponding_Instance (Get_Container_Process (D)))); (Get_Bound_Processor
(Corresponding_Instance (Get_Container_Process (D))));
end if;
-- Then, we check whether the thread is directly bound to a core -- Then, we check whether the thread is directly bound to a core
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment