mirror of https://github.com/golang/go.git
runtime: remove unnecessary calls to memclr
Go will have already cleared the structs (the original C wouldn't have). Change-Id: I4a5a0cfd73953181affc158d188aae2ce281bb33 Reviewed-on: https://go-review.googlesource.com/27435 Run-TryBot: Michael Munday <munday@ca.ibm.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
8cd04da762
commit
fa897643a1
|
|
@ -388,7 +388,6 @@ func osyield()
|
|||
//go:nowritebarrierrec
|
||||
func setsig(i int32, fn uintptr, restart bool) {
|
||||
var sa sigactiont
|
||||
memclr(unsafe.Pointer(&sa), unsafe.Sizeof(sa))
|
||||
sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK | _SA_RESTORER
|
||||
if restart {
|
||||
sa.sa_flags |= _SA_RESTART
|
||||
|
|
@ -431,8 +430,6 @@ func setsigstack(i int32) {
|
|||
//go:nowritebarrierrec
|
||||
func getsig(i int32) uintptr {
|
||||
var sa sigactiont
|
||||
|
||||
memclr(unsafe.Pointer(&sa), unsafe.Sizeof(sa))
|
||||
if rt_sigaction(uintptr(i), nil, &sa, unsafe.Sizeof(sa.sa_mask)) != 0 {
|
||||
throw("rt_sigaction read failure")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue