diff options
author | Austin Clements <austin@google.com> | 2019-09-01 10:37:44 -0400 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2019-09-04 17:56:09 +0000 |
commit | 4af3c17f8cd37288a5bb9bc53e8b88c58f5624d1 (patch) | |
tree | 0d8dd44ab11f568977ca4521d896323fcd744c37 /src/runtime/sys_openbsd_arm.s | |
parent | 6719d889e1a333989c6f461a66090d5583eeaedf (diff) | |
download | go-4af3c17f8cd37288a5bb9bc53e8b88c58f5624d1.tar.gz go-4af3c17f8cd37288a5bb9bc53e8b88c58f5624d1.zip |
runtime: wrap nanotime, walltime, and write
In preparation for general faketime support, this renames the existing
nanotime, walltime, and write functions to nanotime1, walltime1, and
write1 and wraps them with trivial Go functions. This will let us
inject different implementations on all platforms when faketime is
enabled.
Updates #30439.
Change-Id: Ice5ccc513a32a6d89ea051638676d3ee05b00418
Reviewed-on: https://go-review.googlesource.com/c/go/+/192738
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/sys_openbsd_arm.s')
-rw-r--r-- | src/runtime/sys_openbsd_arm.s | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/runtime/sys_openbsd_arm.s b/src/runtime/sys_openbsd_arm.s index 69c3ded17f..69a5f4cf76 100644 --- a/src/runtime/sys_openbsd_arm.s +++ b/src/runtime/sys_openbsd_arm.s @@ -59,7 +59,7 @@ TEXT runtime·read(SB),NOSPLIT|NOFRAME,$0 MOVW R0, ret+12(FP) RET -TEXT runtime·write(SB),NOSPLIT|NOFRAME,$0 +TEXT runtime·write1(SB),NOSPLIT|NOFRAME,$0 MOVW fd+0(FP), R0 // arg 1 - fd MOVW p+4(FP), R1 // arg 2 - buf MOVW n+8(FP), R2 // arg 3 - nbyte @@ -155,8 +155,8 @@ TEXT runtime·setitimer(SB),NOSPLIT,$0 SWI $0 RET -// func walltime() (sec int64, nsec int32) -TEXT runtime·walltime(SB), NOSPLIT, $32 +// func walltime1() (sec int64, nsec int32) +TEXT runtime·walltime1(SB), NOSPLIT, $32 MOVW CLOCK_REALTIME, R0 // arg 1 - clock_id MOVW $8(R13), R1 // arg 2 - tp MOVW $87, R12 // sys_clock_gettime @@ -172,9 +172,9 @@ TEXT runtime·walltime(SB), NOSPLIT, $32 RET -// int64 nanotime(void) so really -// void nanotime(int64 *nsec) -TEXT runtime·nanotime(SB),NOSPLIT,$32 +// int64 nanotime1(void) so really +// void nanotime1(int64 *nsec) +TEXT runtime·nanotime1(SB),NOSPLIT,$32 MOVW CLOCK_MONOTONIC, R0 // arg 1 - clock_id MOVW $8(R13), R1 // arg 2 - tp MOVW $87, R12 // sys_clock_gettime |