Repository navigation
Commit 9c71a2e
posix-clocks: Introduce clock_get_ktime() callback
The callsite in common_timer_get() has already a comment:
/*
* The timespec64 based conversion is suboptimal, but it's not
* worth to implement yet another callback.
*/
kc->clock_get(timr->it_clock, &ts64);
now = timespec64_to_ktime(ts64);
The upcoming support for time namespaces requires to have access to:
- The time in a task's time namespace for sys_clock_gettime()
- The time in the root name space for common_timer_get()
That adds a valid reason to finally implement a separate callback which
returns the time in ktime_t format.
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Co-developed-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20191112012724.250792-10-dima@arista.com1 parent 2f58bf9 commit 9c71a2e
3 files changed
Lines changed: 46 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
666 | | - | |
| 666 | + | |
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
| |||
677 | 677 | | |
678 | 678 | | |
679 | 679 | | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
680 | 696 | | |
681 | 697 | | |
682 | 698 | | |
| |||
840 | 856 | | |
841 | 857 | | |
842 | 858 | | |
| 859 | + | |
843 | 860 | | |
844 | 861 | | |
845 | 862 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
174 | 179 | | |
175 | 180 | | |
176 | 181 | | |
| |||
193 | 198 | | |
194 | 199 | | |
195 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
196 | 206 | | |
197 | 207 | | |
198 | 208 | | |
| |||
228 | 238 | | |
229 | 239 | | |
230 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
231 | 246 | | |
232 | 247 | | |
233 | 248 | | |
234 | 249 | | |
235 | 250 | | |
236 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
237 | 257 | | |
238 | 258 | | |
239 | 259 | | |
| |||
781 | 801 | | |
782 | 802 | | |
783 | 803 | | |
784 | | - | |
| 804 | + | |
785 | 805 | | |
786 | 806 | | |
787 | 807 | | |
| |||
1262 | 1282 | | |
1263 | 1283 | | |
1264 | 1284 | | |
| 1285 | + | |
1265 | 1286 | | |
1266 | 1287 | | |
1267 | 1288 | | |
| |||
1280 | 1301 | | |
1281 | 1302 | | |
1282 | 1303 | | |
| 1304 | + | |
1283 | 1305 | | |
1284 | 1306 | | |
1285 | 1307 | | |
| |||
1310 | 1332 | | |
1311 | 1333 | | |
1312 | 1334 | | |
| 1335 | + | |
1313 | 1336 | | |
1314 | 1337 | | |
1315 | 1338 | | |
| |||
1326 | 1349 | | |
1327 | 1350 | | |
1328 | 1351 | | |
| 1352 | + | |
1329 | 1353 | | |
1330 | 1354 | | |
1331 | 1355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
0 commit comments