Skip to contentSkip to conversation

Patch to add the TimerFD API to "cyclictest"

PATCH OB 1 participant 1 message Sep 4, 2009 Kbuild

lore
Share & tools
lore

OB

author
#0 lore raw

Hello,

Please find below a patch to enable the use of the TimerFD API to the cyclictest program.

It add the -F option for this, and can be used on either MONOTONIC and REALTIME clock, in absolute or relative time.

It has been tested on CentOS4 with a custom , 2.6.19-rt15 kernel and on a Debian Lenny with a -wireless-testing kernel (non-preempt-rt), so far. (The latest shown a strange behavior : in MONOTONIC / RELATIVE clocking, sometimes it happen that the minimum delay become negative. In my opinion, it would mean that the read() syscall returned *before* the required expiration delay - but it might just be a bug in my code. It does not appear on the preempt-rt kernel)

Please let me know if you see any obvious mistake. You may include this patch in the repository at will.

Bye,

obconseil

Signature · 5 lines
People in the embedded space don't do prototypes. They hack something until it
works, then it's done.
---
Always code as if the person who will maintain your code is a maniac serial
killer that knows where you live
Makefile +1 -1
index 911b05e..e9491dd 100644
@@ -1,7 +1,7 @@
 VERSION_STRING = 0.50
 
 TARGETS	= cyclictest signaltest classic_pi pi_stress hwlatdetect
-FLAGS	= -Wall -Wno-nonnull -O2
+FLAGS	= -Wall -Wno-nonnull -O2 -DWITH_TIMERFD
 LIBS 	= -lpthread -lrt
 DESTDIR	?=
 prefix  ?= /usr/local
src/cyclictest/cyclictest.c +98 -8

210 lines not on this page · raw message