| Age | Commit message (Collapse) | Author |
|
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
|
|
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
|
|
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
|
|
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
|
|
R=golang-dev, bradfitz, mikioh.mikioh, dave, minux.ma
CC=golang-dev
https://golang.org/cl/7227043
|
|
Fixes #4306.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/6816054
|
|
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6763043
|
|
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/6615055
|
|
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
|
|
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
|
|
Fixes #2492
R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/6295073
|
|
16-bit uid calls are not always supported in newer kernels.
R=dave, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/6279047
|
|
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
|
|
Don't know if it runs, but at least it builds.
R=bradfitz
TBR=bradfitz
CC=golang-dev
https://golang.org/cl/5373093
|
|
- 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
|
|
R=ken2
CC=golang-dev
https://golang.org/cl/4640045
|
|
R=iant
CC=golang-dev
https://golang.org/cl/4553051
|
|
Fixes #1714.
R=rsc, bradfitzgo
CC=golang-dev
https://golang.org/cl/4441056
|
|
* 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
|
|
R=rsc, iant
CC=golang-dev
https://golang.org/cl/4271060
|
|
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
|
|
Fixes #1376.
R=r
CC=golang-dev
https://golang.org/cl/3869042
|
|
R=ken2
CC=golang-dev
https://golang.org/cl/3523041
|
|
bug introduced at
https://golang.org/cl/2331044
R=ken2
CC=golang-dev
https://golang.org/cl/3440046
|
|
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
|
|
Thanks to kaib for the tip.
R=ken2
CC=golang-dev
https://golang.org/cl/2596043
|
|
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
|
|
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
|
|
R=r
CC=golang-dev
https://golang.org/cl/1952046
|
|
R=r
CC=golang-dev
https://golang.org/cl/1021043
|
|
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
|
|
rsc's algorithm
- applied gofmt -w misc src
- partial CL (last chunk)
R=rsc, r
http://go/go-review/1024041
|
|
- 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
|
|
(replacement for CL 1018053)
R=r
http://go/go-review/1017047
|
|
R=rsc
http://go/go-review/1017037
|
|
go/test: passes 90% (313/345)
R=rsc
APPROVED=rsc
DELTA=90 (83 added, 3 deleted, 4 changed)
OCL=36011
CL=36023
|
|
- 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
|
|
still has problems with godefs.
R=rsc
APPROVED=rsc
DELTA=801 (134 added, 235 deleted, 432 changed)
OCL=35189
CL=35211
|
|
re-enabling and massaging code.
R=rsc
APPROVED=rsc
DELTA=2496 (1880 added, 330 deleted, 286 changed)
OCL=33487
CL=33504
|