From b2a950bb7343a46ff3edd8502fe2f02fc051a308 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Sat, 27 Dec 2014 20:58:00 -0800 Subject: runtime: rename gothrow to throw Rename "gothrow" to "throw" now that the C version of "throw" is no longer needed. This change is purely mechanical except in panic.go where the old version of "throw" has been deleted. sed -i "" 's/[[:<:]]gothrow[[:>:]]/throw/g' runtime/*.go Change-Id: Icf0752299c35958b92870a97111c67bcd9159dc3 Reviewed-on: https://go-review.googlesource.com/2150 Reviewed-by: Minux Ma Reviewed-by: Dave Cheney --- src/runtime/os1_linux.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/runtime/os1_linux.go') diff --git a/src/runtime/os1_linux.go b/src/runtime/os1_linux.go index 0174856914..a10e4e9aa1 100644 --- a/src/runtime/os1_linux.go +++ b/src/runtime/os1_linux.go @@ -137,7 +137,7 @@ func newosproc(mp *m, stk unsafe.Pointer) { if ret < 0 { print("runtime: failed to create new OS thread (have ", mcount(), " already; errno=", -ret, ")\n") - gothrow("newosproc") + throw("newosproc") } } @@ -242,21 +242,21 @@ func setsig(i int32, fn uintptr, restart bool) { } sa.sa_handler = fn if rt_sigaction(uintptr(i), &sa, nil, unsafe.Sizeof(sa.sa_mask)) != 0 { - gothrow("rt_sigaction failure") + throw("rt_sigaction failure") } } func setsigstack(i int32) { var sa sigactiont if rt_sigaction(uintptr(i), nil, &sa, unsafe.Sizeof(sa.sa_mask)) != 0 { - gothrow("rt_sigaction failure") + throw("rt_sigaction failure") } if sa.sa_handler == 0 || sa.sa_handler == _SIG_DFL || sa.sa_handler == _SIG_IGN || sa.sa_flags&_SA_ONSTACK != 0 { return } sa.sa_flags |= _SA_ONSTACK if rt_sigaction(uintptr(i), &sa, nil, unsafe.Sizeof(sa.sa_mask)) != 0 { - gothrow("rt_sigaction failure") + throw("rt_sigaction failure") } } @@ -265,7 +265,7 @@ func getsig(i int32) uintptr { memclr(unsafe.Pointer(&sa), unsafe.Sizeof(sa)) if rt_sigaction(uintptr(i), nil, &sa, unsafe.Sizeof(sa.sa_mask)) != 0 { - gothrow("rt_sigaction read failure") + throw("rt_sigaction read failure") } if sa.sa_handler == funcPC(sigtramp) { return funcPC(sighandler) -- cgit v1.3-5-g9baa