diff options
author | Martin Liska <mliska@suse.cz> | 2022-10-28 10:02:34 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-10-28 10:02:34 +0200 |
commit | 1eb021edb27e26f95cda63df121f6bc951647599 (patch) | |
tree | 7f132fded85bd7d05d81cd4c1227da2fd0c3c2d5 /libgo | |
parent | 62e475bad0d668c432bb97113cbf73fa281b8b55 (diff) | |
parent | 0607307768b66a90e27c5bc91a247acc938f070e (diff) | |
download | gcc-1eb021edb27e26f95cda63df121f6bc951647599.zip gcc-1eb021edb27e26f95cda63df121f6bc951647599.tar.gz gcc-1eb021edb27e26f95cda63df121f6bc951647599.tar.bz2 |
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/go/runtime/mem_gccgo.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libgo/go/runtime/mem_gccgo.go b/libgo/go/runtime/mem_gccgo.go index fa3389d..1e84f4f 100644 --- a/libgo/go/runtime/mem_gccgo.go +++ b/libgo/go/runtime/mem_gccgo.go @@ -15,7 +15,7 @@ import ( //go:linkname sysFree //extern mmap -func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) unsafe.Pointer +func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off _libgo_off_t_type) unsafe.Pointer //extern munmap func munmap(addr unsafe.Pointer, length uintptr) int32 @@ -38,7 +38,7 @@ func init() { } func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (unsafe.Pointer, int) { - p := sysMmap(addr, n, prot, flags, fd, off) + p := sysMmap(addr, n, prot, flags, fd, _libgo_off_t_type(off)) if uintptr(p) == _MAP_FAILED { return nil, errno() } @@ -47,6 +47,7 @@ func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (u // Don't split the stack as this method may be invoked without a valid G, which // prevents us from allocating more stack. +// //go:nosplit func sysAlloc(n uintptr, sysStat *sysMemStat) unsafe.Pointer { p, err := mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, mmapFD, 0) @@ -165,6 +166,7 @@ func sysHugePage(v unsafe.Pointer, n uintptr) { // Don't split the stack as this function may be invoked without a valid G, // which prevents us from allocating more stack. +// //go:nosplit func sysFree(v unsafe.Pointer, n uintptr, sysStat *sysMemStat) { sysStat.add(-int64(n)) |