Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
schedstatistics.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2014 Freie Universität Berlin
3
* 2019 Inria
4
*
5
* This file is subject to the terms and conditions of the GNU Lesser
6
* General Public License v2.1. See the file LICENSE in the top level
7
* directory for more details.
8
*/
9
29
#ifndef SCHEDSTATISTICS_H
30
#define SCHEDSTATISTICS_H
31
32
#include <stdint.h>
33
#include "
kernel_types.h
"
34
35
#ifdef __cplusplus
36
extern
"C"
{
37
#endif
38
42
typedef
struct
{
43
uint32_t
laststart
;
45
unsigned
int
schedules
;
46
uint64_t
runtime_ticks
;
47
}
schedstat_t
;
48
52
extern
schedstat_t
sched_pidlist
[
KERNEL_PID_LAST
+ 1];
53
58
void
init_schedstatistics
(
void
);
59
60
#ifdef __cplusplus
61
}
62
#endif
63
64
#endif
/* SCHEDSTATISTICS_H */
65
schedstat_t::runtime_ticks
uint64_t runtime_ticks
The total runtime of this thread in ticks.
Definition:
schedstatistics.h:46
schedstat_t
Scheduler statistics.
Definition:
schedstatistics.h:42
sched_pidlist
schedstat_t sched_pidlist[KERNEL_PID_LAST+1]
Thread statistics table.
schedstat_t::laststart
uint32_t laststart
Time stamp of the last time this thread was scheduled to run.
Definition:
schedstatistics.h:43
schedstat_t::schedules
unsigned int schedules
How often the thread was scheduled to run.
Definition:
schedstatistics.h:45
init_schedstatistics
void init_schedstatistics(void)
Registers the sched statistics callback and sets laststart for caller thread.
KERNEL_PID_LAST
#define KERNEL_PID_LAST
The last valid PID (inclusive).
Definition:
sched.h:115
kernel_types.h
Types used by the kernel.
Generated on Tue Nov 24 2020 19:46:52 by
1.8.17