]> Cypherpunks repositories - gostls13.git/commit
runtime: inline calls to notok
authorRuss Cox <rsc@golang.org>
Thu, 8 Mar 2012 19:03:56 +0000 (14:03 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 8 Mar 2012 19:03:56 +0000 (14:03 -0500)
commit36aa7d4d14c1dbca2405e265b8bbf1260e9d825c
tree5cac6a56c810a4d0bec4b969664e2e04c11ce74c
parentc978a5a3a94fbd03cfe012fbf1ac556728d7fb41
runtime: inline calls to notok

When a very low-level system call that should never fail
does fail, we call notok, which crashes the program.
Often, we are then left with only the program counter as
information about the crash, and it is in notok.
Instead, inline calls to notok (it is just one instruction
on most systems) so that the program counter will
tell us which system call is unhappy.

R=golang-dev, gri, minux.ma, bradfitz
CC=golang-dev
https://golang.org/cl/5792048
12 files changed:
src/pkg/runtime/asm_amd64.s
src/pkg/runtime/sys_darwin_386.s
src/pkg/runtime/sys_darwin_amd64.s
src/pkg/runtime/sys_freebsd_386.s
src/pkg/runtime/sys_freebsd_amd64.s
src/pkg/runtime/sys_linux_amd64.s
src/pkg/runtime/sys_linux_arm.s
src/pkg/runtime/sys_netbsd_386.s
src/pkg/runtime/sys_netbsd_amd64.s
src/pkg/runtime/sys_openbsd_386.s
src/pkg/runtime/sys_openbsd_amd64.s
src/pkg/runtime/sys_windows_amd64.s