Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
844f8a49
Commit
844f8a49
authored
9 years ago
by
Kaspar Schleiser
Browse files
Options
Downloads
Patches
Plain Diff
sys: ps: adapt to xtimer
parent
085383bf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sys/ps/ps.c
+9
-6
9 additions, 6 deletions
sys/ps/ps.c
with
9 additions
and
6 deletions
sys/ps/ps.c
+
9
−
6
View file @
844f8a49
...
...
@@ -18,11 +18,14 @@
#include
<stdio.h>
#include
"thread.h"
#include
"hwtimer.h"
#include
"sched.h"
#include
"tcb.h"
#include
"kernel_types.h"
#ifdef MODULE_SCHEDSTATISTICS
#include
"xtimer.h"
#endif
/* list of states copied from tcb.h */
const
char
*
state_names
[]
=
{
[
STATUS_RUNNING
]
=
"running"
,
...
...
@@ -53,7 +56,7 @@ void ps(void)
#ifdef DEVELHELP
"| stack ( used) | location "
#endif
#if
SCHEDSTATISTICS
#if
def MODULE_
SCHEDSTATISTICS
"| runtime | switches"
#endif
"
\n
"
,
...
...
@@ -75,8 +78,8 @@ void ps(void)
stacksz
-=
thread_measure_stack_free
(
p
->
stack_start
);
overall_used
+=
stacksz
;
#endif
#if
SCHEDSTATISTICS
double
runtime_ticks
=
sched_pidlist
[
i
].
runtime_ticks
/
(
double
)
hw
timer_now
()
*
100
;
#if
def MODULE_
SCHEDSTATISTICS
double
runtime_ticks
=
sched_pidlist
[
i
].
runtime_ticks
/
(
double
)
x
timer_now
()
*
100
;
int
switches
=
sched_pidlist
[
i
].
schedules
;
#endif
printf
(
"
\t
%3"
PRIkernel_pid
...
...
@@ -87,7 +90,7 @@ void ps(void)
#ifdef DEVELHELP
" | %5i (%5i) | %p "
#endif
#if
SCHEDSTATISTICS
#if
def MODULE_
SCHEDSTATISTICS
" | %6.3f%% | %8d"
#endif
"
\n
"
,
...
...
@@ -99,7 +102,7 @@ void ps(void)
#ifdef DEVELHELP
,
p
->
stack_size
,
stacksz
,
p
->
stack_start
#endif
#if
SCHEDSTATISTICS
#if
def MODULE_
SCHEDSTATISTICS
,
runtime_ticks
,
switches
#endif
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment