Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Thanassis Tsiodras
RTEMS-build-workflows
Commits
f58adda7
Commit
f58adda7
authored
Apr 21, 2016
by
Thanassis Tsiodras
Browse files
Verified on target, sync works properly
parent
deef4444
Pipeline
#105
skipped
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
OAR/src/init.c
View file @
f58adda7
...
...
@@ -34,7 +34,7 @@ rtems_task Init(rtems_task_argument argument)
i
==
0
?
RTEMS_FLOATING_POINT
:
RTEMS_DEFAULT_ATTRIBUTES
,
&
Task_id
[
i
]);
if
(
status
!=
RTEMS_SUCCESSFUL
)
{
printf
(
"Failed to rtems_task_create... status:%0x
\n
"
,
status
);
printf
(
"
[PARENT]
Failed to rtems_task_create... status:%0x
\n
"
,
status
);
rtems_task_delete
(
RTEMS_SELF
);
}
...
...
@@ -45,7 +45,7 @@ rtems_task Init(rtems_task_argument argument)
i
);
}
// To give coverage code room to breathe!
printf
(
"Parent task waits for his children to complete...
\n
"
);
printf
(
"
[PARENT]
Parent task waits for his children to complete...
\n
"
);
{
rtems_option
options
=
(
RTEMS_EVENT_ANY
|
RTEMS_WAIT
);
rtems_event_set
in
=
(
RTEMS_EVENT_0
|
RTEMS_EVENT_1
);
...
...
@@ -55,11 +55,11 @@ rtems_task Init(rtems_task_argument argument)
status
=
rtems_event_receive
(
in
,
options
,
RTEMS_NO_TIMEOUT
,
&
out
);
if
(
status
==
RTEMS_SUCCESSFUL
)
{
completed
|=
out
;
printf
(
"Task completed!
\n
"
);
printf
(
"
[PARENT]
Task completed!
\n
"
);
fflush
(
stdout
);
}
}
printf
(
"All tasks completed!
\n
"
);
printf
(
"
[PARENT]
All tasks completed!
\n
"
);
fflush
(
stdout
);
}
exit
(
0
);
...
...
OAR/src/task1.c
View file @
f58adda7
...
...
@@ -4,7 +4,7 @@
rtems_task
Task1_EntryPoint
(
rtems_task_argument
argument
)
{
int
task_no
=
(
int
)
argument
;
printf
(
"
Inside task %d
...
\n
"
,
task_no
);
printf
(
"
[TASK %d] Starting
...
\n
"
,
task_no
);
fflush
(
stdout
);
int
j
;
...
...
@@ -15,7 +15,7 @@ rtems_task Task1_EntryPoint(rtems_task_argument argument)
d
+=
1
.
001
;
d
*=
1
.
0001
;
}
printf
(
"Computed value
by task %d
was %ld
\n
"
,
task_no
,
(
long
)
d
);
printf
(
"
[TASK %d]
Computed value was %ld
\n
"
,
task_no
,
(
long
)
d
);
rtems_event_send
(
g_init_task_id
,
RTEMS_EVENT_0
);
rtems_task_delete
(
RTEMS_SELF
);
}
OAR/src/task2.c
View file @
f58adda7
...
...
@@ -4,7 +4,7 @@
rtems_task
Task2_EntryPoint
(
rtems_task_argument
argument
)
{
int
task_no
=
(
int
)
argument
;
printf
(
"
Inside task %d
...
\n
"
,
task_no
);
printf
(
"
[TASK %d] Starting
...
\n
"
,
task_no
);
fflush
(
stdout
);
int
j
;
...
...
@@ -15,7 +15,7 @@ rtems_task Task2_EntryPoint(rtems_task_argument argument)
dummy
^=
k
;
dummy
++
;
}
printf
(
"Computed value
by task %d
was %lld
\n
"
,
task_no
,
dummy
);
printf
(
"
[TASK %d]
Computed value was %lld
\n
"
,
task_no
,
dummy
);
rtems_event_send
(
g_init_task_id
,
RTEMS_EVENT_1
);
rtems_task_delete
(
RTEMS_SELF
);
}
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