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
PolyORB-HI-C
Commits
c1b49038
Commit
c1b49038
authored
May 10, 2018
by
Maxime Perrotin
Browse files
Merge branch 'master' of
https://gitrepos.estec.esa.int/taste/polyorb-hi-c
parents
e891b372
11cb2392
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/po_hi_task.c
View file @
c1b49038
...
...
@@ -403,11 +403,16 @@ pthread_t __po_hi_posix_create_thread (__po_hi_priority_t priority,
CPU_ZERO
(
&
cpuset
);
CPU_SET
(
core_id
,
&
cpuset
);
if
(
pthread_attr_setaffinity_np
(
&
attr
,
sizeof
(
cpuset
),
&
cpuset
)
!=
0
)
/* Under CircleCI, affinity setting makes a thread that can't be spawned! */
/* So skip calling setaffinity if you detect this environment.. */
/* We are already in __linux__ #ifdef scope, so this run-time check should work. */
if
(
NULL
==
getenv
(
"CIRCLECI"
))
{
if
(
pthread_attr_setaffinity_np
(
&
attr
,
sizeof
(
cpuset
),
&
cpuset
)
!=
0
)
{
__DEBUGMSG
(
"CANNOT SET AFFINTY
\n
"
);
return
((
pthread_t
)
__PO_HI_ERROR_PTHREAD_ATTR
);
}
}
#else
#warning pthread_affinity managmeent disabled for Compcert
#endif
...
...
Write
Preview
Supports
Markdown
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