| author | |
| committer | |
| log | d71076c9826ddd66bfcc04b9a6ded9dbf540d239 |
| tree | dfa089b196eacda8b07df4a221ed709f22e289f7 |
| parent | 624fa8523a2c4158ddc9fce231181a9e8583a633 |
| signature |
If there is a VDSO, it will have clock_gettime(). The main thing we're concerned
about is architectures that don't have a VDSO at all, of which there are a few.1 files changed, 1 insertions(+), 1 deletions(-)
lib/std/os/linux.zig+1-1| ... | ... | @@ -1399,7 +1399,7 @@ const VdsoClockGettime = *align(1) const fn (clockid_t, *timespec) callconv(.C) |
| 1399 | 1399 | var vdso_clock_gettime: ?VdsoClockGettime = &init_vdso_clock_gettime; |
| 1400 | 1400 | |
| 1401 | 1401 | pub fn clock_gettime(clk_id: clockid_t, tp: *timespec) usize { |
| 1402 | if (@hasDecl(VDSO, "CGT_SYM")) { | |
| 1402 | if (VDSO != void) { | |
| 1403 | 1403 | const ptr = @atomicLoad(?VdsoClockGettime, &vdso_clock_gettime, .unordered); |
| 1404 | 1404 | if (ptr) |f| { |
| 1405 | 1405 | const rc = f(clk_id, tp); |