Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MojitOS
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
sepia-pub
MojitOS
Merge requests
!9
fix sensor example (doc)
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix sensor example (doc)
devel
into
main
Overview
0
Commits
257
Pipelines
1
Changes
61
Merged
Georges Da Costa
requested to merge
devel
into
main
1 year ago
Overview
0
Commits
257
Pipelines
1
Changes
61
Expand
plus add build instructions (in doc/counter_ex.c)
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
b9679859
257 commits,
1 year ago
61 files
+
6489
−
1332
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
61
Search (e.g. *.vue) (Ctrl+P)
doc/counter_ex.h
0 → 100644
+
26
−
0
Options
/*
* Example of a basic counter: an accumulator
**/
unsigned
int
init_acc
(
char
*
,
void
**
);
unsigned
int
get_acc
(
uint64_t
*
results
,
void
*
);
void
clean_acc
(
void
*
);
void
label_acc
(
char
**
labels
,
void
*
);
Sensor
rapl
=
{
.
init
=
init_acc
,
.
get
=
get_acc
,
.
clean
=
clean_acc
,
.
label
=
label_acc
,
.
nb_opt
=
1
,
};
Optparse
rapl_opt
[
1
]
=
{
{
.
longname
=
"accumulator"
,
.
shortname
=
'a'
,
.
argtype
=
OPTPARSE_NONE
,
/* OPTPARSE_NONE / OPTPARSE_OPTIONAL / OPTPARSE_REQUIRED */
.
usage_arg
=
NULL
,
.
usage_msg
=
"dumb accumulator"
,
},
};
Loading