]> Cypherpunks repositories - gostls13.git/commit
runtime: reconvert sigqueue.goc from C to Go
authorRuss Cox <rsc@golang.org>
Thu, 4 Sep 2014 17:51:12 +0000 (13:51 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 4 Sep 2014 17:51:12 +0000 (13:51 -0400)
commit81ed684a710087eb9745566fa49e57e048088193
tree350cfaa5d56799c52a01f3a55a0d514479f9377d
parent43345a118b9e68f7779914cc7a965a6b8a1d585e
runtime: reconvert sigqueue.goc from C to Go

The original conversion in CL 132090043 cut up
the function in an attempt to avoid converting most
of the code to Go. This contorts the control flow.

While debugging the onM signal stack bug,
I reconverted sigqueue.goc in its entirety.
This restores the original control flow, which is
much easier to understand.

The current conversion is correct, it's just complex
and will be hard to maintain. The new one is as
readable as the original code.

I uploaded sigqueue.goc as the initial copy of
sigqueue.go in the CL, so if you view the diffs
of sigqueue.go comparing against patch set 2 [sic]
it will show the actual starting point.

For example:
https://golang.org/cl/136160043/diff2/20001:60001/src/pkg/runtime/sigqueue.go

LGTM=dvyukov, iant
R=golang-codereviews, dvyukov, iant
CC=golang-codereviews, khr, r
https://golang.org/cl/136160043
14 files changed:
src/cmd/api/goapi.go
src/pkg/runtime/os_darwin.h
src/pkg/runtime/os_dragonfly.h
src/pkg/runtime/os_freebsd.h
src/pkg/runtime/os_linux.h
src/pkg/runtime/os_netbsd.h
src/pkg/runtime/os_openbsd.h
src/pkg/runtime/os_plan9.h
src/pkg/runtime/os_solaris.h
src/pkg/runtime/os_windows.h
src/pkg/runtime/proc.go
src/pkg/runtime/signal.c [new file with mode: 0644]
src/pkg/runtime/sigqueue.c [deleted file]
src/pkg/runtime/sigqueue.go