aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/syscall/syscall_linux_arm.go
AgeCommit message (Collapse)Author
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-07-25syscall: prlimit argument error for Getrlimit and Setrlimit on Linux 32-bitPeter Mundy
The rlimit arguments for prlimit are reversed for linux 32-bit (386 and arm). Getrlimit becomes Setrlimit and vice versa. Fixes #5949. R=iant, mikioh.mikioh, rsc CC=golang-dev https://golang.org/cl/11803043
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-10-25syscall: implement (*PtraceRegs).PC() and SetPC()Shenghou Ma
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6763043
2012-10-08syscall: fix Statfs and Fstatfs on Linux/ARMShenghou Ma
R=golang-dev, dave, rsc CC=golang-dev https://golang.org/cl/6615055
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-31pkg/syscall: unexport Prlimit.Han-Wen Nienhuys
This syscall was inadvertently exported when fixing Getrlimit/Setrlimit on 32-bit platforms. R=golang-dev, minux.ma CC=golang-dev https://golang.org/cl/6458051
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
2012-06-03syscall: fix 32-bit uid callsShenghou Ma
16-bit uid calls are not always supported in newer kernels. R=dave, rsc, bradfitz CC=golang-dev https://golang.org/cl/6279047
2012-03-06syscall: fix mkall.sh, mksyscall_linux.pl, and regen for Linux/ARMShenghou Ma
CL 3075041 says ARM is not little-endian, but my test suggests otherwise. My test program is: package main import ("fmt"; "syscall"; "os") func main() { err := syscall.Fallocate(1, 1/*FALLOC_FL_KEEP_SIZE*/, 0, int64(40960)); fmt.Fprintln(os.Stderr, err) } Without this CL, ./test > testfile will show: file too large; and strace shows: fallocate(1, 01, 0, 175921860444160) = -1 EFBIG (File too large) With this CL, ./test > testfile will show: <nil>; and strace shows: fallocate(1, 01, 0, 40960) = 0 Quoting rsc: "[It turns out that] ARM syscall ABI requires 64-bit arguments to use an (even, odd) register pair, not an (odd, even) pair. Switching to "big-endian" worked because it ended up using the high 32-bits (always zero in the tests we had) as the padding word, because the 64-bit argument was the last one, and because we fill in zeros for the rest of the system call arguments, up to six. So it happened to work." I updated mksyscall_linux.pl to accommodate the register pair ABI requirement, and removed all hand-tweaked syscall routines in favor of the auto-generated ones. These including: Ftruncate, Truncate, Pread and Pwrite. Some recent Linux/ARM distributions do not bundle kernel asm headers, so instead we always get latest asm/unistd.h from git.kernel.org (just like what we do for FreeBSD). R=ken, r, rsc, r, dave, iant CC=golang-dev https://golang.org/cl/5726051
2011-11-14syscall: more linux arm build fixesRuss Cox
Don't know if it runs, but at least it builds. R=bradfitz TBR=bradfitz CC=golang-dev https://golang.org/cl/5373093
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-22syscall: fix Ftruncate under linux/arm5Dave Cheney
Fixes #1714. R=rsc, bradfitzgo CC=golang-dev https://golang.org/cl/4441056
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-08arm: more fixesRuss Cox
R=ken2 CC=golang-dev https://golang.org/cl/3523041
2010-12-08syscall: fix linux/arm buildRuss Cox
bug introduced at https://golang.org/cl/2331044 R=ken2 CC=golang-dev https://golang.org/cl/3440046
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
2010-09-07arm: use the correct stat syscallsBrad Fitzpatrick
We were using the 64-bit struct with the old 32-bit system calls. http://code.google.com/p/go/issues/detail?id=1083 This also fixes up mksyscall.sh to generate gofmt-compliant code. R=rsc CC=golang-dev, kaib https://golang.org/cl/2148042
2010-08-23arm: fix build, regenerate syscall filesKai Backman
R=r CC=golang-dev https://golang.org/cl/1952046
2010-05-03syscall: fix arm build (fix bugs in generator, to add O_LARGEFILE)Russ Cox
R=r CC=golang-dev https://golang.org/cl/1021043
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-04fixing (badly) linux_arm syscall.Kai Backman
R=rsc http://go/go-review/1017037
2009-10-23all of pkg now compiles, fixes a few more testsKai Backman
go/test: passes 90% (313/345) R=rsc APPROVED=rsc DELTA=90 (83 added, 3 deleted, 4 changed) OCL=36011 CL=36023
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-10-01some progress on arm linux syscall interface. ztypes_linux_armKai Backman
still has problems with godefs. R=rsc APPROVED=rsc DELTA=801 (134 added, 235 deleted, 432 changed) OCL=35189 CL=35211
2009-08-18pkg/sort compiling and some progress on syscall. mostlyKai Backman
re-enabling and massaging code. R=rsc APPROVED=rsc DELTA=2496 (1880 added, 330 deleted, 286 changed) OCL=33487 CL=33504