@@ -59,19 +59,6 @@ static const struct k_clock clock_realtime, clock_monotonic;
59
59
#error "SIGEV_THREAD_ID must not share bit with other SIGEV values!"
60
60
#endif
61
61
62
- /*
63
- * CLOCKs: The POSIX standard calls for a couple of clocks and allows us
64
- * to implement others. This structure defines the various
65
- * clocks.
66
- *
67
- * FUNCTIONS: The CLOCKs structure defines possible functions to
68
- * handle various clock functions.
69
- *
70
- * The standard POSIX timer management code assumes the
71
- * following: 1.) The k_itimer struct (sched.h) is used for
72
- * the timer. 2.) The list, it_lock, it_clock, it_id and
73
- * it_pid fields are not modified by timer code.
74
- */
75
62
static struct k_itimer * __lock_timer (timer_t timer_id , unsigned long * flags );
76
63
77
64
#define lock_timer (tid , flags ) \
@@ -141,7 +128,6 @@ static inline void unlock_timer(struct k_itimer *timr, unsigned long flags)
141
128
spin_unlock_irqrestore (& timr -> it_lock , flags );
142
129
}
143
130
144
- /* Get clock_realtime */
145
131
static int posix_get_realtime_timespec (clockid_t which_clock , struct timespec64 * tp )
146
132
{
147
133
ktime_get_real_ts64 (tp );
@@ -153,7 +139,6 @@ static ktime_t posix_get_realtime_ktime(clockid_t which_clock)
153
139
return ktime_get_real ();
154
140
}
155
141
156
- /* Set clock_realtime */
157
142
static int posix_clock_realtime_set (const clockid_t which_clock ,
158
143
const struct timespec64 * tp )
159
144
{
@@ -166,9 +151,6 @@ static int posix_clock_realtime_adj(const clockid_t which_clock,
166
151
return do_adjtimex (t );
167
152
}
168
153
169
- /*
170
- * Get monotonic time for posix timers
171
- */
172
154
static int posix_get_monotonic_timespec (clockid_t which_clock , struct timespec64 * tp )
173
155
{
174
156
ktime_get_ts64 (tp );
@@ -181,17 +163,13 @@ static ktime_t posix_get_monotonic_ktime(clockid_t which_clock)
181
163
return ktime_get ();
182
164
}
183
165
184
- /*
185
- * Get monotonic-raw time for posix timers
186
- */
187
166
static int posix_get_monotonic_raw (clockid_t which_clock , struct timespec64 * tp )
188
167
{
189
168
ktime_get_raw_ts64 (tp );
190
169
timens_add_monotonic (tp );
191
170
return 0 ;
192
171
}
193
172
194
-
195
173
static int posix_get_realtime_coarse (clockid_t which_clock , struct timespec64 * tp )
196
174
{
197
175
ktime_get_coarse_real_ts64 (tp );
@@ -242,9 +220,6 @@ static int posix_get_hrtimer_res(clockid_t which_clock, struct timespec64 *tp)
242
220
return 0 ;
243
221
}
244
222
245
- /*
246
- * Initialize everything, well, just everything in Posix clocks/timers ;)
247
- */
248
223
static __init int init_posix_timers (void )
249
224
{
250
225
posix_timers_cache = kmem_cache_create ("posix_timers_cache" ,
0 commit comments