]> Cypherpunks repositories - gostls13.git/commit
syscall: split implementation of Pipe/Pipe2 per GOOS
authorDave Cheney <dave@cheney.net>
Tue, 24 Feb 2015 23:20:13 +0000 (10:20 +1100)
committerDave Cheney <dave@cheney.net>
Wed, 25 Feb 2015 00:19:40 +0000 (00:19 +0000)
commit9b3ccc082f6bda01727fc98096f7d197bba830db
treed5befc595e1b97997e067a472df71d8a19414b70
parent7ce02613870a67f26055836ded66591be148b82b
syscall: split implementation of Pipe/Pipe2 per GOOS

Updates #9974

This proposal moves the definition of Pipe an Pipe2 from the generic
syscall_linux.go to the GOOS specific variants. This is in preparation
for the arm64 port.

For platforms where pipe2(2) is not supported in the minimum 2.6.23 kernel,
amd64 and 386, we retain pipe(2). For all other platforms pipe(2) is removed
and Pipe forwards to pipe2(2).

Because mksycall.pl does not sort symbols before generating the output file
the diff includes some unavoidable code moves as Pipe and Pipe2 are processed
latter in the run.

Discussion: https://groups.google.com/forum/#!topic/golang-dev/zpeFtN2z5Fc

Change-Id: Ie26d6761eeb9760dbaff974ee8bc0d57a9ceaee4
Reviewed-on: https://go-review.googlesource.com/5833
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
src/syscall/syscall_linux.go
src/syscall/syscall_linux_386.go
src/syscall/syscall_linux_amd64.go
src/syscall/syscall_linux_arm.go
src/syscall/syscall_linux_ppc64x.go
src/syscall/zsyscall_linux_386.go
src/syscall/zsyscall_linux_amd64.go
src/syscall/zsyscall_linux_arm.go
src/syscall/zsyscall_linux_ppc64.go
src/syscall/zsyscall_linux_ppc64le.go