From 24249256b2cfa2f50a20b1004466e3f49d02a442 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 22 Feb 2026 12:59:31 +0100 Subject: misc fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 2 +- README | 10 +++++----- config.mk | 4 ++-- slack.1 | 11 ++++++----- slack.c | 2 +- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index d0c9a85..5920ee3 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ slack: slack.o slack.o: slack.c arg.h $(CC) -c -o $@ slack.c $(CFLAGS) $(CPPFLAGS) -check: +check: slack test $$(./slack 1ms ./slack get) = 1ms test $$(./slack 1ms ./slack GET) = 1000000 test $$(./slack 1 ./slack reset ./slack GET) = $$(./slack GET) diff --git a/README b/README index 97aff1d..f9be3a6 100644 --- a/README +++ b/README @@ -9,10 +9,10 @@ DESCRIPTION with a new timer slack value. If the verb get or GET is used, the current timer slack - value and exit. If get is used, the program shall use - as high prefix as possible. If GET is used the value - shall be printed in nanoseconds but not unit shall be - printed. + value is printed and the process exit. If get is used, + the program shall use the highest prefix as possible. + If GET is used the value shall be printed in nanoseconds + but no unit shall be printed. If the verb reset is used, the process shall set the timer slack value for the process to the default timer @@ -41,7 +41,7 @@ NOTES Real-time threads do not slack around. RATIONALE - Could be useful increase the performance of your computer. + Could be useful to increase the performance of your computer. SEE ALSO nice(1), ionice(1), prctl(2) diff --git a/config.mk b/config.mk index aa81003..bc78e3e 100644 --- a/config.mk +++ b/config.mk @@ -1,8 +1,8 @@ PREFIX = /usr MANPREFIX = $(PREFIX)/share/man -CC = cc +CC = c99 CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -CFLAGS = -std=c99 -Wall -O2 +CFLAGS = LDFLAGS = -s diff --git a/slack.1 b/slack.1 index d50043c..96085b5 100644 --- a/slack.1 +++ b/slack.1 @@ -12,10 +12,11 @@ If the verb .B get or .B GET -is used, the current timer slack value and exit. If get is used, the -program shall use as high prefix as possible. If -.V GET -is used the value shall be printed in nanoseconds but not unit shall +is used, the current timer slack value is printed and the +process exit. If get is used, the +program shall use the highest prefix as possible. If +.B GET +is used the value shall be printed in nanoseconds but no unit shall be printed. .PP If the verb reset is used, the process shall set the timer slack value @@ -58,7 +59,7 @@ Fail if the timer slack value cannot be set. .SH NOTES Real-time threads do not slack around. .SH RATIONALE -Could be useful increase the performance of your computer. +Could be useful to increase the performance of your computer. .SH "SEE ALSO" .BR nice (1), .BR ionice (1), diff --git a/slack.c b/slack.c index 265255b..a58de74 100644 --- a/slack.c +++ b/slack.c @@ -26,7 +26,7 @@ usage(void) int main(int argc, char **argv) { - int fatal; + int fatal = 0; long int slackvalue; const char *suffix; char *end; -- cgit v1.2.3-70-g09d2