MFC after: 1 week
Hm, plain csr_read might be more appropriate given the result is put in a u_int, though it's a bit academic given we don't support RV32. The two are the same on RV64 but on RV32 it'll loop until it reads a consistent time and timeh to get a 64-bit value from two 32-bit CSRs and then throw away the upper half.
Thanks! I can confirm that truss no longer shows the clock_gettime() syscalls with this version of the patch.
Thanks for this one.
Nit: not required for new files
for new files that won't be MFC'd to stable/12..... I don't think this will be, given the riscv support in 12 isn't so good (IIRC, I might be wrong), but thought I'd mention in case I am wrong.
That's right, there's no point bringing this past stable/13, but the precision is helpful.