runtime: convert Solaris port to Go
Memory management was consolitated with the BSD ports, since
it was almost identical.
Assembly thunks are gone, being replaced by the new //go:linkname
feature.
This change supersedes CL 138390043 (runtime: convert solaris
netpoll to Go), which was previously reviewed and tested.
This change is only the first step, the port now builds,
but doesn't run. Binaries fail to exec:
ld.so.1: 6.out: fatal: 6.out: TLS requirement failure : TLS support is unavailable
Killed
This seems to happen because binaries don't link with libc.so
anymore. We will have to solve that in a different CL.
Also this change is just a rough translation of the original
C code, cleanup will come in a different CL.
[This CL is part of the removal of C code from package runtime.
See golang.org/s/dev.cc for an overview.]
Hello rsc (cc: dfc, golang-codereviews@googlegroups.com, iant, khr, minux, r, rlh), I'd like you to review ...
10 years, 3 months ago
(2014-11-12 15:10:32 UTC)
#1
Hello rsc (cc: dfc, golang-codereviews@googlegroups.com, iant, khr, minux, r,
rlh),
I'd like you to review this change to the dev.cc branch of
ssh://hg@bitbucket.org/goarm64/go
On 2014/11/12 15:21:15, aram wrote: > > I'd like you to review this change to ...
10 years, 3 months ago
(2014-11-12 15:22:26 UTC)
#4
On 2014/11/12 15:21:15, aram wrote:
> > I'd like you to review this change to the dev.cc branch of
> > ssh://hg@bitbucket.org/goarm64/go
>
> That sounds wrong, let me fix it.
I re-mailed it, hope its fixed.
*** Submitted as https://code.google.com/p/go/source/detail?r=cc53451c5af3 *** [dev.cc] runtime: convert Solaris port to Go Memory management was ...
10 years, 3 months ago
(2014-11-13 15:07:35 UTC)
#8
*** Submitted as https://code.google.com/p/go/source/detail?r=cc53451c5af3 ***
[dev.cc] runtime: convert Solaris port to Go
Memory management was consolitated with the BSD ports, since
it was almost identical.
Assembly thunks are gone, being replaced by the new //go:linkname
feature.
This change supersedes CL 138390043 (runtime: convert solaris
netpoll to Go), which was previously reviewed and tested.
This change is only the first step, the port now builds,
but doesn't run. Binaries fail to exec:
ld.so.1: 6.out: fatal: 6.out: TLS requirement failure : TLS support is
unavailable
Killed
This seems to happen because binaries don't link with libc.so
anymore. We will have to solve that in a different CL.
Also this change is just a rough translation of the original
C code, cleanup will come in a different CL.
[This CL is part of the removal of C code from package runtime.
See golang.org/s/dev.cc for an overview.]
LGTM=rsc
R=rsc, dave
CC=golang-codereviews, iant, khr, minux, r, rlh
https://codereview.appspot.com/174960043https://codereview.appspot.com/174960043/diff/370001/src/runtime/netpoll_sola...
File src/runtime/netpoll_solaris.go (right):
https://codereview.appspot.com/174960043/diff/370001/src/runtime/netpoll_sola...
src/runtime/netpoll_solaris.go:70: //go:dynimport libc_port_create port_create
"libc.so"
On 2014/11/12 18:55:34, rsc wrote:
> this does nothing.
> in the C compiler, dynimport is a deprecated alias for cgo_import_dynamic.
> in the Go compiler, only cgo_import_dynamic is recgonized.
Done.
https://codereview.appspot.com/174960043/diff/370001/src/runtime/netpoll_sola...
src/runtime/netpoll_solaris.go:78: //go:linkname libc·port_getn libc·port_getn
On 2014/11/12 18:55:33, rsc wrote:
> this does nothing. you can't have a go variable named libc·port_getn. there is
> nothing for it to affect
>
Good catch, "Edit ," failure, done.
https://codereview.appspot.com/174960043/diff/370001/src/runtime/os3_solaris.go
File src/runtime/os3_solaris.go (right):
https://codereview.appspot.com/174960043/diff/370001/src/runtime/os3_solaris....
src/runtime/os3_solaris.go:9: //go:dynexport end _end
On 2014/11/12 18:55:34, rsc wrote:
> cgo_export_dynamic
>
> also, probably you mean
> //go:cgo_export_dynamic runtime.end _end
>
> the first argument is a linkname, not a local variable name.
> unless you have changed the default linkname for the local variable end,
> it will be runtime.end.
>
> (and it needs to be in package runtime for something else.)
>
> same for the others
Done.
https://codereview.appspot.com/174960043/diff/370001/src/runtime/os3_solaris....
src/runtime/os3_solaris.go:13: //go:dynimport libc____errno ___errno "libc.so"
On 2014/11/12 18:55:34, rsc wrote:
> cgo_import_dynamic
Done.
https://codereview.appspot.com/174960043/diff/370001/src/runtime/os3_solaris....
src/runtime/os3_solaris.go:202: // m.procid is a uint64, but thr_new writes a
uint32 on 32-bit systems.
On 2014/11/12 18:55:34, rsc wrote:
> I don't see anything initializing procid in any way, so this is probably
> unnecessary. There's also not a thr_new.
>
Done.
https://codereview.appspot.com/174960043/diff/370001/src/runtime/os_solaris.go
File src/runtime/os_solaris.go (right):
https://codereview.appspot.com/174960043/diff/370001/src/runtime/os_solaris.g...
src/runtime/os_solaris.go:9: func sysctl(mib *uint32, miblen uint32, out *byte,
size *uintptr, dst *byte, ndst uintptr) int32
On 2014/11/12 18:55:34, rsc wrote:
> this needs a //go:noescape if you ever call it. maybe you don't in which case
it
> can just go away.
Done (removed).
https://codereview.appspot.com/174960043/diff/370001/src/runtime/syscall2_sol...
File src/runtime/syscall2_solaris.go (right):
https://codereview.appspot.com/174960043/diff/370001/src/runtime/syscall2_sol...
src/runtime/syscall2_solaris.go:9: //go:dynimport libc_chdir chdir "libc.so"
On 2014/11/12 18:55:34, rsc wrote:
> cgo_import_dynamic
Done.
Issue 174960043: [dev.cc] code review 174960043: runtime: convert Solaris port to Go
(Closed)
Created 10 years, 3 months ago by aram
Modified 10 years, 3 months ago
Reviewers:
Base URL:
Comments: 14