Messages in this thread | | | From | "Elliott, Robert (Servers)" <> | Subject | Is CLOCKS_MASK macro obsolete? | Date | Thu, 14 Oct 2021 23:46:11 +0000 |
| |
The CLOCKS_MASK macro in include/uapi/linux/time.h seems broken; it's ORing together two numbered values, one of which is 0. Perhaps these clock IDs started as a bitmask? CLOCKS_MASK doesn't appear to be used anywhere in the kernel; nor does the adjacent CLOCKS_MONO.
Should those macros be deleted?
Excerpt: #define CLOCK_REALTIME 0 #define CLOCK_MONOTONIC 1 #define CLOCK_PROCESS_CPUTIME_ID 2 #define CLOCK_THREAD_CPUTIME_ID 3 #define CLOCK_MONOTONIC_RAW 4 #define CLOCK_REALTIME_COARSE 5 #define CLOCK_MONOTONIC_COARSE 6 #define CLOCK_BOOTTIME 7 #define CLOCK_REALTIME_ALARM 8 #define CLOCK_BOOTTIME_ALARM 9 /* * The driver implementing this got removed. The clock ID is kept as a * place holder. Do not reuse! */ #define CLOCK_SGI_CYCLE 10 #define CLOCK_TAI 11
#define MAX_CLOCKS 16 #define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC) #define CLOCKS_MONO CLOCK_MONOTONIC
| |