Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RTEMS-build-workflows
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thanassis Tsiodras
RTEMS-build-workflows
Commits
dfd61dd5
Commit
dfd61dd5
authored
Apr 04, 2016
by
Thanassis Tsiodras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a non-FPU task in the example
parent
f03cf5d7
Pipeline
#58
skipped
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
9 deletions
+32
-9
OAR/Makefile
OAR/Makefile
+4
-3
OAR/src/init.c
OAR/src/init.c
+4
-4
OAR/src/system.h
OAR/src/system.h
+2
-1
OAR/src/task1.c
OAR/src/task1.c
+1
-1
OAR/src/task2.c
OAR/src/task2.c
+21
-0
No files found.
OAR/Makefile
View file @
dfd61dd5
...
...
@@ -25,11 +25,12 @@ endif
# Your source files: regardless of where they reside in the source tree,
# VPATH will locate them...
NONFPU_SRC
=
\
NONFPU_SRC
=
\
init.c
FPU_SRC
=
\
task1.c
FPU_SRC
=
\
task1.c
\
task2.c
# Build a Dependency list and an Object list, by replacing the .c
# extension to .d for dependency files, and .o for object files.
...
...
OAR/src/init.c
View file @
dfd61dd5
...
...
@@ -25,9 +25,9 @@ rtems_task Init(rtems_task_argument argument)
Task_name
[
i
],
(
rtems_task_priority
)
2
,
RTEMS_MINIMUM_STACK_SIZE
,
RTEMS_DEFAULT_MODES
,
// use RTEMS_DEFAULT_MODES | RTEMS_TIMESLICE for Linux/Windows like
// handling of tasks with same priority (i.e. pre-emption)
RTEMS_FLOATING_POINT
,
// use RTEMS_DEFAULT_ATTRIBUTES for non-native FPU tasks
RTEMS_DEFAULT_MODES
,
// use RTEMS_DEFAULT_MODES | RTEMS_TIMESLICE for Linux/Windows like
// handling of tasks with same priority (i.e. pre-emption)
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
);
...
...
@@ -37,7 +37,7 @@ rtems_task Init(rtems_task_argument argument)
// Start Task
status
=
rtems_task_start
(
Task_id
[
i
],
Task
_EntryPoint
,
i
==
0
?
Task1_EntryPoint
:
Task2
_EntryPoint
,
i
);
}
printf
(
"Parent task sleeps for a second...
\n
"
);
...
...
OAR/src/system.h
View file @
dfd61dd5
...
...
@@ -3,7 +3,8 @@
#include <rtems/rtems/tasks.h>
rtems_task
Init
(
rtems_task_argument
argument
);
rtems_task
Task_EntryPoint
(
rtems_task_argument
argument
);
rtems_task
Task1_EntryPoint
(
rtems_task_argument
argument
);
rtems_task
Task2_EntryPoint
(
rtems_task_argument
argument
);
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 64
...
...
OAR/src/task1.c
View file @
dfd61dd5
#include "system.h"
#include <stdio.h>
rtems_task
Task_EntryPoint
(
rtems_task_argument
argument
)
rtems_task
Task
1
_EntryPoint
(
rtems_task_argument
argument
)
{
int
task_no
=
(
int
)
argument
;
printf
(
"Inside task %d...
\n
"
,
task_no
);
...
...
OAR/src/task2.c
0 → 100644
View file @
dfd61dd5
#include "system.h"
#include <stdio.h>
rtems_task
Task2_EntryPoint
(
rtems_task_argument
argument
)
{
int
task_no
=
(
int
)
argument
;
printf
(
"Inside task %d...
\n
"
,
task_no
);
fflush
(
stdout
);
//rtems_task_wake_after(100);
int
j
;
long
long
int
dummy
=
0
;
for
(
j
=
0
;
j
<
100000
;
j
++
)
{
int
k
;
for
(
k
=
0
;
k
<
100
;
k
++
)
dummy
^=
k
;
dummy
++
;
}
printf
(
"Computed value by task %d was %lld
\n
"
,
task_no
,
dummy
);
rtems_task_delete
(
RTEMS_SELF
);
}
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