Compare commits

...

5 Commits
1.0.0 ... main

Author SHA1 Message Date
rjc 462a4212b6 Fix markup 2022-06-24 12:24:40 +00:00
Solene Rapenne d130c0b563 README: update the content to clarify the purpose of obsdfreqd 2022-04-21 21:27:01 +02:00
Solene Rapenne feb3ac237a obsdfreqd: explicitely initialize current_mode to battery mode 2022-04-09 17:19:16 +02:00
Solene Rapenne dc5448729f makefile: make it compliant for ports infrastructure 2022-04-07 21:37:11 +02:00
Solene Rapenne 513852b740 README: give information about minimal OpenBSD version supported 2022-03-26 13:01:48 +01:00
3 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
PREFIX=/usr/local
PREFIX?=/usr/local
LDFLAGS = -lm
CFLAGS += -pedantic -Wall -Wextra -Wmissing-prototypes \
@ -16,5 +16,5 @@ clean:
install: obsdfreqd
install -o root -g wheel -m 555 obsdfreqd ${PREFIX}/sbin/obsdfreqd
install -o root -g wheel -m 555 obsdfreqd.rc /etc/rc.d/obsdfreqd
install -o root -g wheel -m 555 obsdfreqd.rc ${DESTDIR}/etc/rc.d/obsdfreqd
install -o root -g wheel -m 444 obsdfreqd.1 ${PREFIX}/man/man1/obsdfreqd.1

View File

@ -1,6 +1,6 @@
# obsdfreqd
Userland CPU frequency scheduling for OpenBSD
Userland CPU frequency scheduling for OpenBSD >= 7.1
# TLDR
@ -72,4 +72,4 @@ The end goal is to provide a feature rich CPU frequency scheduler for the follow
# Relation to the OpenBSD project
This is mostly a playground project so I can experiment with CPU frequency scheduling, there is no goal to import it into the OpenBSD kernel ever, but maybe I can learn here and improve the kernel code later.
obsdfreqd is available as a package in OpenBSD current. The point of this progrm is to allow OpenBSD users to have a quiet and cool system which is not possible with the current code due to [this change in the kernel](https://marc.info/?l=openbsd-cvs&m=163563630606615&w=2).

2
main.c
View File

@ -132,7 +132,7 @@ int main(int argc, char *argv[]) {
long cpu[CPUSTATES], cpu_previous[CPUSTATES];
int frequency = 0;
int current_mode;
int current_mode = 0;
int value, current_frequency, inertia_timer = 0;
int cpu_usage_percent = 0, cpu_usage;
float temp;