aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/linux
AgeCommit message (Collapse)Author
2010-09-07runtime: fix linux/amd64 build: wrong name for munmapRuss Cox
TBR=r CC=golang-dev https://golang.org/cl/2140043
2010-09-07runtime: use manual stack for garbage collectionRuss Cox
Old code was using recursion to traverse object graph. New code uses an explicit stack, cutting the per-pointer footprint to two words during the recursion and avoiding the standard allocator and stack splitting code. in test/garbage: Reduces parser runtime by 2-3% Reduces Peano runtime by 40% Increases tree runtime by 4-5% R=r CC=golang-dev https://golang.org/cl/2150042
2010-08-04amd64: use segment memory for thread-local storageRuss Cox
Returns R14 and R15 to the available register pool. Plays more nicely with ELF ABI C code. In particular, our signal handlers will no longer crash when a signal arrives during execution of a cgo C call. Fixes #720. R=ken2, r CC=golang-dev https://golang.org/cl/1847051
2010-07-30runtime: do not fall through in SIGBUS/SIGSEGVRuss Cox
Faults beyond the first page are not expected and should fail loudly. They are not subject to recover. R=r CC=golang-dev https://golang.org/cl/1915042
2010-07-17linux/386: use Xen-friendly ELF TLS instruction sequenceRuss Cox
Fixes #465. R=iant CC=golang-dev https://golang.org/cl/1665051
2010-06-28Only catch all signals if os/signal package imported.Ian Lance Taylor
Fixes #776. R=rsc CC=golang-dev https://golang.org/cl/1745041
2010-06-12runtime: fix 386 signal handler bugRuss Cox
Cannot assume that g == m->curg at time of signal. Must save actual g and restore. Fixes flaky crashes with messages like throw: malloc mlookup throw: malloc/free - deadlock throw: unwindstack on self throw: free mlookup (and probably others) when running cgo. R=iant CC=golang-dev https://golang.org/cl/1648043
2010-05-19runtime: avoid allocation for fixed stringsRuss Cox
R=r CC=golang-dev https://golang.org/cl/1083041
2010-04-13runtime: better trace for fault due to nil pointer callRuss Cox
R=r CC=golang-dev https://golang.org/cl/854048
2010-04-09Run initcgo for all amd64 targets, not just GNU/Linux.Ian Lance Taylor
This is required to make cgo export work on Darwin. Note that this corrects the stack alignment when calling initcgo to that required by gcc on amd64. R=rsc CC=golang-dev https://golang.org/cl/907041
2010-04-08runtime: turn divide by zero, nil dereference into panicsRuss Cox
tested on linux/amd64, linux/386, linux/arm, darwin/amd64, darwin/386. freebsd untested; will finish in a separate CL. for now all the panics are errorStrings. richer structures can be added as necessary once the mechanism is shaked out. R=r CC=golang-dev https://golang.org/cl/906041
2010-04-05runtime: handle malloc > 2GB correctlyRuss Cox
R=ken2 CC=golang-dev https://golang.org/cl/821048
2010-04-05runtime: various arm fixesRuss Cox
* correct symbol table size * do not reorder functions in output * traceback * signal handling * use same code for go + defer * handle leaf functions in symbol table R=kaib, dpx CC=golang-dev https://golang.org/cl/884041
2010-03-29runtime: Remove unused runtime.write from linux/amd64Christopher Wedgwood
Also minor reformatting. R=rsc CC=golang-dev https://golang.org/cl/845041
2010-02-22runtime: work around Linux kernel bug in futexRuss Cox
Fixes #420. R=r CC=golang-dev https://golang.org/cl/218065
2010-02-10arm: fix build on androidRuss Cox
R=kaib CC=golang-dev https://golang.org/cl/206059
2010-02-08runtime: allow arbitrary return type in SetFinalizer.Russ Cox
finalize chan, to free OS X semaphore inside Lock. os: finalize File, to close fd. Fixes #503. R=ken2 CC=golang-dev https://golang.org/cl/204065
2010-02-08runtime: instrument malloc + garbage collector.Russ Cox
add simple garbage collection benchmark. R=iant CC=golang-dev https://golang.org/cl/204053
2010-02-03os/signal: send SIGCHLDs to IncomingChristopher Wedgwood
R=rsc CC=golang-dev https://golang.org/cl/199082
2010-01-25in C and asm, replace pkg·name with ·nameRuss Cox
(eliminate assumption of package global name space, make code easier to move between packages). R=r CC=golang-dev https://golang.org/cl/194072
2010-01-13runtime: GS already set up by setldt in Linux/386; remove duplicateDevon H. O'Dell
R=rsc CC=golang-dev https://golang.org/cl/186146
2010-01-13runtime cleanup.Russ Cox
* move memory code into $GOOS-specific directory. * allow printing of static strings < 256 bytes. (dynamic strings will bump maxstring as they are allocated.) * use cgo2c for runtime.mal. R=r, dho CC=golang-dev https://golang.org/cl/186143
2010-01-06Ported runtime to Windows.Hector Chu
R=rsc CC=golang-dev https://golang.org/cl/176066
2009-12-16runtime: if os/signal is not in use, crash onRuss Cox
most signals, so that ordinary programs can be killed, for example. Fixes #434. R=dsymonds1 CC=golang-dev, hoisie https://golang.org/cl/180064
2009-12-15os/signal: new packageDavid Symonds
Fixes #71. R=rsc, r https://golang.org/cl/162056
2009-12-08Fix stack on FreeBSD / add stack check across the boardDevon H. O'Dell
FreeBSD was passing stk as the new thread's stack base, while stk is the top of the stack in go. The added check should cause a trap if this ever comes up in any new ports, or regresses in current ones. R=rsc CC=golang-dev https://golang.org/cl/167055
2009-11-18Remove unnecessary execute bits.William Josephson
R=rsc https://golang.org/cl/156077
2009-11-17syscall: use correct pointer in recvfrom/sendto.Russ Cox
linux/386 stack trace: use 32-bit hex. Fixes #159. R=r https://golang.org/cl/154178
2009-11-17FreeBSD-specific porting work.Devon H. O'Dell
cgo/libmach remain unimplemented. However, compilers, runtime, and packages are 100%. I still need to go through and implement missing syscalls (at least make sure they're all listed), but for all shipped functionality, this is done. Ship! ;) R=rsc, VenkateshSrinivas https://golang.org/cl/152142
2009-11-13runtime: warn about SELinux based mmap failures on Linux.Adam Langley
SELinux will cause mmap to fail when we request w+x memory unless the user has configured their policies. We have a warning in make.bash, but it's quite likely that the policy will be reset at some point and then all their binaries start failing. This patch prints a warning on Linux when mmap fails with EACCES. R=rsc CC=golang-dev https://golang.org/cl/152086
2009-11-11 add cache flushing call after generating closure.Kai Backman
go/test: passes 88% (306/347) R=rsc https://golang.org/cl/152089
2009-11-05 make 5g executables run on android/arm hardware. change OABIKai Backman
usage to EABI. go/test: passes 85% (296/347) on random android phone. R=rsc http://go/go-review/1024003
2009-10-29clone and futexKai Backman
go/test: passes 99% (343/347) R=rsc http://go/go-review/1016004
2009-10-26Get the right sigaction struct for the 386 rt_sigaction systemIan Lance Taylor
call. This uses the header files from a 32-bit Ubuntu Hardy system. The use of _LOOSE_KERNEL_NAMES seems right. The -D__ARCH_SI_UID_T works around a bug which appears to be fixed in later Linux versions. R=rsc http://go/go-review/1013015
2009-10-25proper syscall convention for armKai Backman
R=rsc http://go/go-review/1015009
2009-10-22Fix the sigaction declaration to match the system for Linux.Ian Lance Taylor
I don't know whether Darwin needs a change here. R=rsc http://go/go-review/1013010
2009-10-22s/pc/PC/ in traceback output to match amd64.Ian Lance Taylor
test/run expects to see "PC". R=rsc http://go/go-review/1015002
2009-10-15rename sys functions to runtime,Russ Cox
because they are in package runtime. another step to enforcing package boundaries. R=r DELTA=732 (114 added, 93 deleted, 525 changed) OCL=35811 CL=35824
2009-10-038c, 8l dynamic loading support.Russ Cox
better mach binaries. cgo working on darwin+linux amd64+386. eliminated context switches - pi is 30x faster. add libcgo to build. on snow leopard: - non-cgo binaries work; all tests pass. - cgo binaries work on amd64 but not 386. R=r DELTA=2031 (1316 added, 626 deleted, 89 changed) OCL=35264 CL=35304
2009-09-30cgo working on linux/386Russ Cox
R=r DELTA=70 (47 added, 4 deleted, 19 changed) OCL=35167 CL=35171
2009-09-22changes to accommodate nacl:Russ Cox
* change ldt0setup to set GS itself; nacl won't let us do it. * change breakpoint to INT $3 so 8l can translate to HLT for nacl. * panic if closure is needed on nacl. * do not try to access symbol table on nacl. * mmap in 64kB chunks. nacl support: * system calls, threading, locks. R=r DELTA=365 (357 added, 5 deleted, 3 changed) OCL=34880 CL=34906
2009-09-21convert 386 to use %gs instead of %fs for extern register.Russ Cox
required for nacl and may be nicer for ffi, because %gs is the standard register for thread-local storage. R=ken OCL=34861 CL=34866
2009-09-18changed 5c calling convention to use stack exclusively for inKai Backman
params. a number of fixes to assembly routines that assumed R0 had the first arg. one stack offset fix, arm pushes the link register on stack top. go/test: passes 65% (235/364) tests R=rsc APPROVED=rsc DELTA=20 (11 added, 0 deleted, 9 changed) OCL=34809 CL=34812
2009-08-24start of FFI support, and a demo.Russ Cox
R=r DELTA=494 (492 added, 0 deleted, 2 changed) OCL=33784 CL=33810
2009-08-24linker workRuss Cox
* use //ffi comments in package import data to generate relocation entries and library loads. * call initffi in rt0.s if present R=r DELTA=117 (91 added, 3 deleted, 23 changed) OCL=33739 CL=33750
2009-06-23Runtime is now starting up with a dummy c program as target:Kai Backman
- morestack and gosave/gogo/gocall support - memclr and memset from inferno - bugfixes in _rt0_arm R=rsc APPROVED=rsc DELTA=304 (174 added, 36 deleted, 94 changed) OCL=30636 CL=30642
2009-06-17update 386 to new runtime (CL 30381)Russ Cox
R=r DELTA=298 (119 added, 81 deleted, 98 changed) OCL=30427 CL=30443
2009-06-17runtime: stack growth adjustments, cleanupRuss Cox
* keep coherent SP/PC in gobuf (i.e., SP that would be in use at that PC) * gogocall replaces setspgoto, should work better in presence of link registers * delete unused system calls only amd64; 386 is now broken R=r DELTA=548 (183 added, 183 deleted, 182 changed) OCL=30381 CL=30442
2009-06-10Adding a batch of missing system calls.Kai Backman
R=rsc APPROVED=rsc DELTA=1329 (1264 added, 1 deleted, 64 changed) OCL=30040 CL=30158
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