mirror of
https://github.com/golang/go
synced 2024-11-23 01:30:02 -07:00
runtime: remove runtime.Add testing function
Replace with unsafe.Add. Change-Id: Ic5c155349dadc51457119b3c05ab717cdfd26c95 Reviewed-on: https://go-review.googlesource.com/c/go/+/521176 Reviewed-by: Michael Knyszek <mknyszek@google.com> Run-TryBot: Austin Clements <austin@google.com> Auto-Submit: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
38a0c5bdb4
commit
01cad815a1
@ -11,7 +11,6 @@ const SigeventMaxSize = _sigev_max_size
|
|||||||
|
|
||||||
var NewOSProc0 = newosproc0
|
var NewOSProc0 = newosproc0
|
||||||
var Mincore = mincore
|
var Mincore = mincore
|
||||||
var Add = add
|
|
||||||
|
|
||||||
type Siginfo siginfo
|
type Siginfo siginfo
|
||||||
type Sigevent sigevent
|
type Sigevent sigevent
|
||||||
|
@ -45,7 +45,7 @@ func TestLockOSThread(t *testing.T) {
|
|||||||
// Use a misaligned pointer to get -EINVAL.
|
// Use a misaligned pointer to get -EINVAL.
|
||||||
func TestMincoreErrorSign(t *testing.T) {
|
func TestMincoreErrorSign(t *testing.T) {
|
||||||
var dst byte
|
var dst byte
|
||||||
v := Mincore(Add(unsafe.Pointer(new(int32)), 1), 1, &dst)
|
v := Mincore(unsafe.Add(unsafe.Pointer(new(int32)), 1), 1, &dst)
|
||||||
|
|
||||||
const EINVAL = 0x16
|
const EINVAL = 0x16
|
||||||
if v != -EINVAL {
|
if v != -EINVAL {
|
||||||
|
Loading…
Reference in New Issue
Block a user