Skip to content

Commit

Permalink
runtime: make RawSyscall panic on Solaris
Browse files Browse the repository at this point in the history
It's unused and doesn't work.

Fixes #20833

Change-Id: I09335e84c60f88dd1771f7353b0097f36a5e7660
Reviewed-on: https://go-review.googlesource.com/82636
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
  • Loading branch information
bradfitz committed Dec 8, 2017
1 parent 38083c8 commit 613f8ca
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/runtime/syscall_solaris.go
Expand Up @@ -174,19 +174,9 @@ func syscall_pipe() (r, w, err uintptr) {
}

// This is syscall.RawSyscall, it exists to satisfy some build dependency,
// but it doesn't work correctly.
//
// DO NOT USE!
//
// TODO(aram): make this panic once we stop calling fcntl(2) in net using it.
// but it doesn't work.
func syscall_rawsyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr) {
call := libcall{
fn: uintptr(unsafe.Pointer(&libc_syscall)),
n: 4,
args: uintptr(unsafe.Pointer(&trap)),
}
asmcgocall(unsafe.Pointer(&asmsysvicall6), unsafe.Pointer(&call))
return call.r1, call.r2, call.err
panic("RawSyscall not available on Solaris")
}

//go:nosplit
Expand Down

1 comment on commit 613f8ca

@davecb
Copy link

@davecb davecb commented on 613f8ca Dec 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bravo, saith the Solarii.

Please sign in to comment.