]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Use enum for scheduler timeout classes
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 17 Dec 2010 14:38:23 +0000 (15:38 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 17 Dec 2010 14:38:23 +0000 (15:38 +0100)
sched.h

diff --git a/sched.h b/sched.h
index d134c865331113bfb226e61d9499e911101cf577..f8e11a4aac8e2402c48ab399fa99f69253c5c66d 100644 (file)
--- a/sched.h
+++ b/sched.h
 
 typedef unsigned long SCH_TimeoutID;
 
-typedef unsigned long SCH_TimeoutClass;
-static const SCH_TimeoutClass SCH_ReservedTimeoutValue = 0;
-static const SCH_TimeoutClass SCH_NtpSamplingClass = 1;
-static const SCH_TimeoutClass SCH_NtpBroadcastClass = 2;
+typedef enum {
+  SCH_ReservedTimeoutValue = 0,
+  SCH_NtpSamplingClass,
+  SCH_NtpBroadcastClass,
+  SCH_NumberOfClasses /* needs to be last */
+} SCH_TimeoutClass;
 
 typedef void* SCH_ArbitraryArgument;
 typedef void (*SCH_FileHandler)(SCH_ArbitraryArgument);