aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/syscall/syscall_linux_amd64.go
AgeCommit message (Collapse)Author
2014-05-16syscall: fix linux amd64 buildRob Pike
TBR=rsc TBR=rsc R=rsc CC=golang-codereviews https://golang.org/cl/100500047
2014-05-16syscall: fix a few Linux system callsRuss Cox
These functions claimed to return error (an interface) and be implemented entirely in assembly, but it's not possible to create an interface from assembly (at least not easily). In reality the functions were written to return an errno uintptr despite the Go prototype saying error. When the errno was 0, they coincidentally filled out a nil error by writing the 0 to the type word of the interface. If the errno was ever non-zero, the functions would create a non-nil error that would crash when trying to call err.Error(). Luckily these functions (Seek, Time, Gettimeofday) pretty much never fail, so it was all kind of working. Found by go vet. LGTM=bradfitz, r R=golang-codereviews, bradfitz, r CC=golang-codereviews https://golang.org/cl/99320043
2014-03-29syscall: add SendmsgN for BSD variants, Linux and SolarisMikio Hara
SendmsgN is an alternate version Sendmsg that also returns the number of bytes transferred, instead of just the error. Update #7645 LGTM=aram, iant R=iant, aram, bradfitz CC=golang-codereviews https://golang.org/cl/81210043
2014-01-21syscall: use unsafe.Pointer instead of uintptr in net syscallsBrad Fitzpatrick
In particular: setsockopt, getsockopt, bind, connect. There are probably more. All platforms cross-compile with make.bash, and all.bash still pases on linux/amd64. Update #7169 R=rsc CC=golang-codereviews https://golang.org/cl/55410043
2013-01-28net, syscall: use accept4 and SOCK_CLOEXEC on LinuxIan Lance Taylor
R=golang-dev, bradfitz, mikioh.mikioh, dave, minux.ma CC=golang-dev https://golang.org/cl/7227043
2012-10-29syscalls: annotate Sendfile() for race detectorDmitriy Vyukov
Fixes #4306. R=golang-dev, iant CC=golang-dev https://golang.org/cl/6816054
2012-09-24syscall: prepare for 64-bit intsRuss Cox
This CL fixes code that incorrectly assumes that int is 32 bits wide. Specifically, the socketpair system call expects a pointer to a pair of int32s, not a pair of ints. Fix this inside the wrappers without changing the APIs. Update #2188. R=golang-dev, r CC=golang-dev https://golang.org/cl/6552063
2012-07-02syscall: use 32 bits structure for Getrlimit/Setrlimit on 386/ARM.Han-Wen Nienhuys
Fixes #2492 R=rsc, bradfitz CC=golang-dev https://golang.org/cl/6295073
2011-11-13syscall: use errorRuss Cox
- syscall (not os) now defines the Errno type. - the low-level assembly functions Syscall, Syscall6, and so on return Errno, not uintptr - syscall wrappers all return error, not uintptr. R=golang-dev, mikioh.mikioh, r, alex.brainman CC=golang-dev https://golang.org/cl/5372080
2011-06-17gc: unsafe.Alignof, unsafe.Offsetof, unsafe.Sizeof now return uintptrRuss Cox
R=ken2 CC=golang-dev https://golang.org/cl/4640045
2011-05-20syscall: sendfileBrad Fitzpatrick
R=iant CC=golang-dev https://golang.org/cl/4553051
2011-04-06syscall: add Mmap, Munmap on Linux, FreeBSD, OS XRuss Cox
* tweak mksyscall*.pl to be more gofmt-compatible. * add mkall.sh -syscalls option. * add sys/mman.h constants on OS X R=r, eds, niemeyer CC=golang-dev https://golang.org/cl/4369044
2011-03-23syscall: GetsockoptInt.Albert Strasheim
R=rsc, iant CC=golang-dev https://golang.org/cl/4271060
2011-03-16syscall: Permit non-blocking syscalls.Ian Lance Taylor
Permit system calls to be designated as non-blocking, meaning that we simply call them without involving the scheduler. This change by itself is mostly performance neutral. In combination with a following change to the net package there is a performance advantage. R=rsc, dfc, r2, iant2, rsc1 CC=golang-dev https://golang.org/cl/4278055
2011-01-05syscall: correct Linux Splice definitionRuss Cox
Fixes #1376. R=r CC=golang-dev https://golang.org/cl/3869042
2010-12-07syscall, net: Add Recvmsg and Sendmsg on Linux.Albert Strasheim
Working on issue 1101. R=rsc CC=golang-dev https://golang.org/cl/2331044
2010-11-05syscall: use 64-bit file size for truncation on LinuxPeter Mundy
Truncate and Ftruncate for 32-bit Linux should use 64-bit offset system calls. R=rsc CC=golang-dev, royger https://golang.org/cl/2943041
2010-10-20syscall/arm: correct 64-bit system call argumentsRuss Cox
Thanks to kaib for the tip. R=ken2 CC=golang-dev https://golang.org/cl/2596043
2010-09-21syscall: Use vsyscall for syscall.Gettimeofday and .Time on linux amd64.Ian Lance Taylor
Regenerate zsyscall_linux_*.go files with recent changes to mksyscall.sh. Add socketpair to syscall_linux_amd64.go; for some reason it was in the generated file but not in the source file. R=rsc, r2 CC=golang-dev https://golang.org/cl/2190044
2009-12-151) Change default gofmt default settings forRobert Griesemer
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 4th set of files. R=rsc CC=golang-dev https://golang.org/cl/180049
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer
rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-05gofmt-ify syscallRobert Griesemer
(replacement for CL 1018053) R=r http://go/go-review/1017047
2009-11-01syscall cleanup.Russ Cox
* rename PORT.sh -> mkall.sh (hopefully more obvious), change behavior: run commands by default. * pull more constants out of #defines automatically, instead of editing large lists by hand. * add Recvfrom, Sendto add os.O_EXCL. R=r http://go/go-review/1017009
2009-10-06- moved 3 functions from syscall_linux to _386 and _amd64 (arm lacks them)Kai Backman
- 64 bit OMINUS - added bunch of missing arm syscalls R=rsc APPROVED=rsc DELTA=203 (189 added, 3 deleted, 11 changed) OCL=35412 CL=35414
2009-09-03fix linux 386 buildRuss Cox
R=austin DELTA=140 (128 added, 0 deleted, 12 changed) OCL=34344 CL=34347
2009-08-12convert non-low-level non-google pkg codeRuss Cox
to whole-package compilation. R=r OCL=33070 CL=33101
2009-06-17add Addr() string to net.Listener interface.Russ Cox
use it to avoid use of fixed ports in tests. convert google/net/rpc to gotest R=r DELTA=523 (275 added, 229 deleted, 19 changed) OCL=30458 CL=30460
2009-06-17shuffle some Linux system calls around for 386Russ Cox
R=r DELTA=37 (17 added, 15 deleted, 5 changed) OCL=30428 CL=30444
2009-06-16386 system call fixes:Russ Cox
* use 64-bit file system calls (Linux, Darwin) * use 32-bit [sic] uid/gid calls (Linux) * fix sockets on Linux Darwin/386 works again. Linux/386 is better but must never have worked; there are still bugs surrounding the creation of new threads in the runtime package. R=austin DELTA=1332 (673 added, 614 deleted, 45 changed) OCL=30327 CL=30380
2009-06-09mv src/lib to src/pkgRob Pike
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102