]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: move mincore from stubs.go to os_linux.go
authorHiroshi Ioka <hirochachacha@gmail.com>
Tue, 25 Jul 2017 12:44:11 +0000 (21:44 +0900)
committerIan Lance Taylor <iant@golang.org>
Fri, 11 Aug 2017 05:08:44 +0000 (05:08 +0000)
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/54910
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/runtime/os_linux.go
src/runtime/stubs.go
src/runtime/sys_darwin_arm.s
src/runtime/sys_darwin_arm64.s

index 78899737b6cb8f0cf51441557d7ad1d2a4a924f5..dac4de4985455db9d8765d516b6b152901160763 100644 (file)
@@ -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
 
index d9a7aa09662f4ae519adaf7a2a66b81823b15a3f..e1f43a5cf0cef8c28ae23db962b2a7f1bd4a9f87 100644 (file)
@@ -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)
index ea559b5f3e432b9cad21a16a8efb8702a418e1b6..5def7766b02d263752e16b2cea37ba27e2b442d8 100644 (file)
@@ -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
index 0e91d5bd10e48b75491072161978eef9914fedc7..34fb1f30861509cf0858889951b63e362553c865 100644 (file)
@@ -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