diff options
Diffstat (limited to 'src/syscall/syscall.go')
-rw-r--r-- | src/syscall/syscall.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/syscall/syscall.go b/src/syscall/syscall.go index 3fd95798f..1f209ecd5 100644 --- a/src/syscall/syscall.go +++ b/src/syscall/syscall.go @@ -26,6 +26,8 @@ // package syscall +import "unsafe" + // StringByteSlice is deprecated. Use ByteSliceFromString instead. // If s contains a NUL byte this function panics instead of // returning an error. @@ -86,3 +88,8 @@ func (ts *Timespec) Nano() int64 { func (tv *Timeval) Nano() int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000 } + +// use is a no-op, but the compiler cannot see that it is. +// Calling use(p) ensures that p is kept live until that point. +//go:noescape +func use(p unsafe.Pointer) |