]> Cypherpunks repositories - gostls13.git/commit
syscall: split implementation of Dup2 per linux GOOS
authorDave Cheney <dave@cheney.net>
Wed, 25 Feb 2015 00:23:04 +0000 (11:23 +1100)
committerDave Cheney <dave@cheney.net>
Wed, 25 Feb 2015 00:52:03 +0000 (00:52 +0000)
commit1fda57ba725044e61148258ea9e98080b0a35260
treea8a824be56b32db14c3a8e6ceb6e22fd7bb7aaff
parentb0d8cb6b3f6ff2d0df66f96e93e33747acc36882
syscall: split implementation of Dup2 per linux GOOS

Updates #9974

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

For all existing platforms Dup2 is not affected. When arm64 is added we'll use
either a forwarding method to Dup3 or

//sysnb        Dup2(oldfd int, newfd int) (err error) = SYS_DUP3

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

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

Change-Id: Icdedf55bb29e749c4230e1ee371bf9d0bd0cfb38
Reviewed-on: https://go-review.googlesource.com/5835
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Dave Cheney <dave@cheney.net>
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