Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
c208dc2d
Commit
c208dc2d
authored
Aug 09, 2016
by
yoogx
Browse files
* (Get_Core_Id): defend again situation where a thread has no
container process
parent
8e82cddc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/backends/ocarina-backends-utils.adb
View file @
c208dc2d
...
...
@@ -4026,17 +4026,19 @@ package body Ocarina.Backends.Utils is
function
Get_Core_Id
(
D
:
Node_Id
)
return
Unsigned_Long_Long
is
pragma
Assert
(
Is_Thread
(
D
));
Core_Id
:
Unsigned_Long_Long
;
Core_Id
:
Unsigned_Long_Long
:=
0
;
begin
-- First, we check the container process is associated to a
-- core. This is the case when we want to allocate one process
-- to a core.
Core_Id
:=
Properties
.
Get_Core_Id
(
Get_Bound_Processor
(
Corresponding_Instance
(
Get_Container_Process
(
D
))));
if
Present
(
Get_Container_Process
(
D
))
then
Core_Id
:=
Properties
.
Get_Core_Id
(
Get_Bound_Processor
(
Corresponding_Instance
(
Get_Container_Process
(
D
))));
end
if
;
-- Then, we check whether the thread is directly bound to a core
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment