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
d3362c8c
Commit
d3362c8c
authored
Apr 06, 2016
by
yoogx
Browse files
* Failure to create a task is a crtical error that should be reported.
Backported from TASTE rev7748
parent
caaea23b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/po_hi_task.c
View file @
d3362c8c
...
...
@@ -155,14 +155,8 @@ void __po_hi_wait_for_tasks ()
int
__po_hi_compute_next_period
(
__po_hi_task_id
task
)
{
#if defined (RTEMS_POSIX) || defined (POSIX) || defined (XENO_POSIX) || defined (_WIN32)
__po_hi_time_t
mytime
;
if
(
__po_hi_get_time
(
&
mytime
)
!=
__PO_HI_SUCCESS
)
{
return
(
__PO_HI_ERROR_CLOCK
);
}
__po_hi_add_times
(
&
(
tasks
[
task
].
timer
),
&
mytime
,
&
tasks
[
task
].
period
);
__po_hi_add_times
(
&
(
tasks
[
task
].
timer
),
&
(
tasks
[
task
].
timer
),
&
tasks
[
task
].
period
);
return
(
__PO_HI_SUCCESS
);
...
...
@@ -310,6 +304,7 @@ pthread_t __po_hi_posix_create_thread (__po_hi_priority_t priority,
pthread_t
tid
;
pthread_attr_t
attr
;
struct
sched_param
param
;
int
err
;
/* Create attributes to store all configuration parameters */
...
...
@@ -357,8 +352,10 @@ pthread_t __po_hi_posix_create_thread (__po_hi_priority_t priority,
}
}
if
(
pthread_create
(
&
tid
,
&
attr
,
(
void
*
(
*
)(
void
*
))
start_routine
,
arg
)
!=
0
)
err
=
pthread_create
(
&
tid
,
&
attr
,
(
void
*
(
*
)(
void
*
))
start_routine
,
arg
);
if
(
err
!=
0
)
{
__PO_HI_DEBUG_CRITICAL
(
"Thread creation failed - pthread_create returned %d
\n
"
,
err
);
return
((
pthread_t
)
__PO_HI_ERROR_PTHREAD_CREATE
);
}
...
...
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