Commit e9348ab4 authored by Hiroshi Ioka's avatar Hiroshi Ioka Committed by Ian Lance Taylor

runtime: move mincore from stubs.go to os_linux.go

Although mincore is declared in stubs.go, mincore isn't used by any
OSes except linux. Move it to os_linux.go and clean up unused code.

Change-Id: I6cfb0fed85c0317a4d091a2722ac55fa79fc7c9a
Reviewed-on: https://go-review.googlesource.com/54910Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 320b6fef
......@@ -193,6 +193,8 @@ const (
var procAuxv = []byte("/proc/self/auxv\x00")
func mincore(addr unsafe.Pointer, n uintptr, dst *byte) int32
func sysargs(argc int32, argv **byte) {
n := argc + 1
......
......@@ -131,7 +131,6 @@ func noescape(p unsafe.Pointer) unsafe.Pointer {
func cgocallback(fn, frame unsafe.Pointer, framesize, ctxt uintptr)
func gogo(buf *gobuf)
func gosave(buf *gobuf)
func mincore(addr unsafe.Pointer, n uintptr, dst *byte) int32
//go:noescape
func jmpdefer(fv *funcval, argp uintptr)
......
......@@ -19,7 +19,6 @@
#define SYS_mmap 197
#define SYS_munmap 73
#define SYS_madvise 75
#define SYS_mincore 78
#define SYS_gettimeofday 116
#define SYS_kill 37
#define SYS_getpid 20
......@@ -150,15 +149,6 @@ TEXT runtime·setitimer(SB),NOSPLIT,$0
SWI $0x80
RET
TEXT runtime·mincore(SB),NOSPLIT,$0
MOVW addr+0(FP), R0
MOVW n+4(FP), R1
MOVW dst+8(FP), R2
MOVW $SYS_mincore, R12
SWI $0x80
MOVW R0, ret+12(FP)
RET
TEXT runtime·walltime(SB), 7, $32
MOVW $8(R13), R0 // timeval
MOVW $0, R1 // zone
......
......@@ -19,7 +19,6 @@
#define SYS_mmap 197
#define SYS_munmap 73
#define SYS_madvise 75
#define SYS_mincore 78
#define SYS_gettimeofday 116
#define SYS_kill 37
#define SYS_getpid 20
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment