lkml.org 
[lkml]   [2021]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectIs CLOCKS_MASK macro obsolete?
Date
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


\
 
 \ /
  Last update: 2021-10-15 01:47    [W:0.051 / U:1.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site