From 206568566473e9a91c05b8b0153d27ecbee466b7 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 30 Nov 2017 19:37:16 +0000 Subject: [PATCH] runtime: use monotonic time on NetBSD Fixes #6007 Change-Id: I239a1699122e086e907ac1f18b1c86a650e1438a Reviewed-on: https://go-review.googlesource.com/81135 Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot Reviewed-by: Russ Cox --- src/runtime/sys_netbsd_386.s | 2 +- src/runtime/sys_netbsd_amd64.s | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/sys_netbsd_386.s b/src/runtime/sys_netbsd_386.s index 8ee7b96ce7..d2e7aa5579 100644 --- a/src/runtime/sys_netbsd_386.s +++ b/src/runtime/sys_netbsd_386.s @@ -164,7 +164,7 @@ TEXT runtime·walltime(SB), NOSPLIT, $32 // void nanotime(int64 *nsec) TEXT runtime·nanotime(SB),NOSPLIT,$32 LEAL 12(SP), BX - MOVL $0, 4(SP) // arg 1 - clock_id + MOVL $3, 4(SP) // arg 1 - clock_id CLOCK_MONOTONIC MOVL BX, 8(SP) // arg 2 - tp MOVL $427, AX // sys_clock_gettime INT $0x80 diff --git a/src/runtime/sys_netbsd_amd64.s b/src/runtime/sys_netbsd_amd64.s index 7235fb1d0d..1e3f7cb137 100644 --- a/src/runtime/sys_netbsd_amd64.s +++ b/src/runtime/sys_netbsd_amd64.s @@ -188,7 +188,7 @@ TEXT runtime·walltime(SB), NOSPLIT, $32 RET TEXT runtime·nanotime(SB),NOSPLIT,$32 - MOVQ $0, DI // arg 1 - clock_id + MOVQ $3, DI // arg 1 - clock_id CLOCK_MONOTONIC LEAQ 8(SP), SI // arg 2 - tp MOVL $427, AX // sys_clock_gettime SYSCALL -- 2.48.1