Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
PolyORB-HI-C
Commits
6d24ad6a
Commit
6d24ad6a
authored
Jul 03, 2017
by
yoogx
Browse files
* Return an error if designated core is different from 0 for
platforms that do not support thread affinity
parent
68e1ce24
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/po_hi_task.c
View file @
6d24ad6a
...
...
@@ -126,7 +126,7 @@ __po_hi_task_id __po_hi_get_task_id (void) {
}
}
#endif
return
(
__PO_HI_ERROR_UNKNOWN
);
}
...
...
@@ -377,7 +377,7 @@ pthread_t __po_hi_posix_create_thread (__po_hi_priority_t priority,
pthread_attr_t
attr
;
struct
sched_param
param
;
int
err
;
/* Create attributes to store all configuration parameters */
if
(
pthread_attr_init
(
&
attr
)
!=
0
)
...
...
@@ -386,7 +386,6 @@ pthread_t __po_hi_posix_create_thread (__po_hi_priority_t priority,
}
#if ( (defined (POSIX) && defined (__linux__)) || (defined (RTEMS_POSIX) && defined (RTEMS412)))
#ifndef __COMPCERT__
/* Thread affinity */
cpu_set_t
cpuset
;
...
...
@@ -408,6 +407,14 @@ pthread_t __po_hi_posix_create_thread (__po_hi_priority_t priority,
#else
#warning pthread_affinity managmeent disabled for Compcert
#endif
#else
if
(
core_id
!=
0
)
{
__PO_HI_DEBUG_CRITICAL
(
"This platform does not support CPU affinity setting
\n
"
);
return
((
pthread_t
)
__PO_HI_ERROR_PTHREAD_ATTR
);
}
#endif
#if defined (POSIX) || defined (XENO_POSIX)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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