Skip to content

Commit 486e732

Browse files
committed
Add doxygen docs
1 parent 080f58b commit 486e732

File tree

114 files changed

+15453
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+15453
-15
lines changed

analyzer.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
/// @file analyzer.c
12
#include "analyzer.h"
23

4+
/**
5+
* Calculates avarage cpu usage.
6+
* @param[in] prev
7+
* @param[out] avarage_cpu_usage
8+
*/
39
static unsigned long average_cpu_usage(struct proc_stat prev,
410
struct proc_stat current) {
511
unsigned long prevIdle = prev.idle + prev.iowait;

cputracker.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/// @file cputracker.c
12
#include "cputracker.h"
23
#include "analyzer.h"
34
#include "printer.h"

cputracker.h

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/// @file cputracker.h
12
#ifndef CPUTRACKER_H
23
#define CPUTRACKER_H
34

@@ -18,24 +19,30 @@
1819
#define TIMEOUT 2
1920
#define THREADS 3
2021

21-
enum State {Reader = 0, Printer = 1, Analyzer = 2};
22+
/**
23+
* @brief Enum with Threads id
24+
*/
25+
enum Ids {Reader = 0, Printer = 1, Analyzer = 2};
2226

27+
/**
28+
* @brief Struct for /proc/stats info.
29+
*/
2330
struct proc_stat {
2431
char name[256];
25-
unsigned long user, // Time spent with normal processing in user mode.
26-
nice, // Time spent with niced processes in user mode.
27-
system, // Time spent running in kernel mode.
28-
idle, // Time spent in vacations twiddling thumbs.
29-
iowait, // Time spent waiting for I/O to completed. This is considered
30-
// idle time too.
31-
irq, // Time spent serving hardware interrupts.
32-
softirq, // Time spent serving software interrupts.
33-
steal, // Time stolen by other operating systems running in a virtual
34-
// environment.
35-
guest, // Time spent for running a virtual CPU or guest OS under the
36-
// control of the kernel.
37-
guest_nice; // Time spent running a niced guest (virtual CPU for guest
38-
// operating systems under the control of the Linux kernel).
32+
unsigned long user, /**< Time spent with normal processing in user mode.*/
33+
nice, /**< Time spent with niced processes in user mode.*/
34+
system, /**< Time spent running in kernel mode.*/
35+
idle, /**< Time spent in vacations twiddling thumbs.*/
36+
iowait, /**< Time spent waiting for I/O to completed. This is considered
37+
idle time too.*/
38+
irq, /**< Time spent serving hardware interrupts.*/
39+
softirq, /**< Time spent serving software interrupts.*/
40+
steal, /**< Time stolen by other operating systems running in a virtual
41+
environment.*/
42+
guest, /**< Time spent for running a virtual CPU or guest OS under the
43+
control of the kernel.*/
44+
guest_nice; /**< Time spent running a niced guest (virtual CPU for guest
45+
operating systems under the control of the Linux kernel).*/
3946
};
4047

4148

0 commit comments

Comments
 (0)