summaryrefslogtreecommitdiff
path: root/src/pkg/runtime
AgeCommit message (Collapse)AuthorFilesLines
2009-10-26Get the right sigaction struct for the 386 rt_sigaction systemIan Lance Taylor3-9/+20
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 Backman1-2/+2
R=rsc http://go/go-review/1015009
2009-10-23fix off by 4 bug in morestack (lr again). remove storing of r0Kai Backman2-14/+2
now that all arguments are passed on the stack. go/test: passes 89% (310/345) R=rsc APPROVED=rsc DELTA=33 (13 added, 14 deleted, 6 changed) OCL=36009 CL=36022
2009-10-22fix off by 4 in newproc arg copying.Kai Backman1-2/+2
R=rsc APPROVED=rsc DELTA=4 (0 added, 0 deleted, 4 changed) OCL=36001 CL=36004
2009-10-22Fix the sigaction declaration to match the system for Linux.Ian Lance Taylor1-1/+1
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 Taylor1-1/+1
test/run expects to see "PC". R=rsc http://go/go-review/1015002
2009-10-22fix build: no acidRob Pike1-2/+4
R=rsc http://go/go-review/1014005
2009-10-22fix build after Mercurial move.Russ Cox1-17/+2
various missing or incorrect files. R=r CC=go-dev http://go/go-review/1014004
2009-10-20bug162, over and overRuss Cox1-0/+14
R=ken OCL=35919 CL=35919
2009-10-19getcallerpc and setcallerpcKai Backman1-11/+7
go/test: passes 87% (303/345) R=rsc APPROVED=rsc DELTA=19 (5 added, 6 deleted, 8 changed) OCL=35903 CL=35906
2009-10-19first version of closures. test/closure doesn't yet pass.Kai Backman1-0/+122
go/test: passes 87% (300/343) R=rsc APPROVED=rsc DELTA=125 (125 added, 0 deleted, 0 changed) OCL=35893 CL=35900
2009-10-15rename sys functions to runtime,Russ Cox34-330/+330
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-15move math out of runtime.Russ Cox1-45/+0
a step toward enforcing package boundaries, necessary to eliminate global package name space. R=r DELTA=581 (310 added, 271 deleted, 0 changed) OCL=35805 CL=35823
2009-10-15test/64bit.go passes but doesn't generate properly yet.Kai Backman1-3/+9
R=rsc APPROVED=rsc DELTA=235 (98 added, 38 deleted, 99 changed) OCL=35789 CL=35813
2009-10-15publish semacquire and semrelease for use by sync.Russ Cox2-3/+14
more enforcing package boundaries R=r DELTA=46 (13 added, 15 deleted, 18 changed) OCL=35806 CL=35806
2009-10-14casKai Backman1-2/+17
R=rsc APPROVED=rsc DELTA=31 (1 added, 8 deleted, 22 changed) OCL=35752 CL=35757
2009-10-14excise some internal references.Russ Cox1-2/+1
R=r DELTA=209 (65 added, 114 deleted, 30 changed) OCL=35718 CL=35721
2009-10-13write stack traces and panics to stderrRob Pike3-17/+22
R=rsc DELTA=31 (5 added, 3 deleted, 23 changed) OCL=35700 CL=35700
2009-10-12changed 5c 64 bit word ordering to little endian so it matchesKai Backman1-13/+13
5g. fixes to 64 bit code gen. added (finally) function to do shifts properly. go/test: passes 83% (287/342) R=rsc APPROVED=rsc DELTA=156 (50 added, 53 deleted, 53 changed) OCL=35589 CL=35616
2009-10-12stack overflow debugging and fix.Russ Cox6-24/+33
* in 6l, -K already meant check for stack underflow. add -KK to mean double-check stack overflows even in nosplit functions. * comment out print locks; they deadlock too easily but are still useful to put back for special occasions. * let runcgo assembly switch to scheduler stack without involving scheduler directly. because runcgo gets called from matchmg, it is too hard to keep it from being called on other stacks. R=r DELTA=94 (65 added, 18 deleted, 11 changed) OCL=35591 CL=35604
2009-10-10fix float <-> int64 conversionsKai Backman1-0/+13
R=rsc APPROVED=rsc DELTA=25 (25 added, 0 deleted, 0 changed) OCL=35566 CL=35574
2009-10-09acid bug fix.Russ Cox1-0/+5
lock printf output to avoid interlacing debug prints. R=r DELTA=10 (7 added, 0 deleted, 3 changed) OCL=35539 CL=35561
2009-10-09keep a list of all the M's,Russ Cox2-1/+8
so that the garbage collector doesn't free them. R=ken OCL=35538 CL=35538
2009-10-07apply gofmt to rand reflect regexp rpc runtime sort strconv strings sync ↵Russ Cox1-4/+4
syscall testing time unicode unsafe utf8 R=gri DELTA=1409 (79 added, 24 deleted, 1306 changed) OCL=35415 CL=35437
2009-10-065l library loading, 64 bit entry pointsKai Backman1-0/+24
R=rsc APPROVED=rsc DELTA=58 (52 added, 3 deleted, 3 changed) OCL=35417 CL=35417
2009-10-05move cas out, add dummy runcgo.Kai Backman3-37/+40
R=rsc APPROVED=rsc DELTA=73 (45 added, 28 deleted, 0 changed) OCL=35363 CL=35366
2009-10-038c, 8l dynamic loading support.Russ Cox13-103/+179
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 Cox1-0/+7
R=r DELTA=70 (47 added, 4 deleted, 19 changed) OCL=35167 CL=35171
2009-09-24missing files; cleaned up g4 nothave output.Russ Cox1-0/+27
fixes 386 build. R=r DELTA=56 (56 added, 0 deleted, 0 changed) OCL=34979 CL=34981
2009-09-24cgo checkpoint.Russ Cox2-1/+27
can write all 3 output files and then compile them by hand. R=r DELTA=919 (841 added, 16 deleted, 62 changed) OCL=34954 CL=34973
2009-09-22changes to accommodate nacl:Russ Cox15-6/+358
* 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 Cox4-35/+26
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 Backman3-6/+12
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-09-18Rudimentary command shell for Ogle. Hack to prevent linkerAustin Clements1-0/+6
from inlining newprocreadylocked. Fix type bridge's handling of basic types. Include interpreter's Thread in bridged native function calls. ; load . "6.out" Started 6.out ; BpSet("main·merge") ; ContWait() breakpoint at 0x400800 => 400800 main·merge /home/austin/src-go1/usr/austin/ptrace/test/sort.go:19 ; bt => 400800 main·merge /home/austin/src-go1/usr/austin/ptrace/test/sort.go:19 400b6a main·mergeSort+0x1be /home/austin/src-go1/usr/austin/ptrace/test/sort.go:34 448313 goexit /home/austin/src-go1/src/pkg/runtime/proc.c:133 ; main.merge.a {1} ; load . "pid:25753" Attached to 25753 ; bt => 479ddf syscall·Syscall+0x24 /home/austin/src-go1/src/pkg/syscall/asm_linux_amd64.s:24 47c011 syscall·Read+0x5d /home/austin/src-go1/src/pkg/syscall/zsyscall_linux_amd64.go:368 4119e5 os·*File·Read+0x5f /home/austin/src-go1/src/pkg/os/file.go:122 427bf3 bufio·*Reader·fill+0x116 /home/austin/src-go1/src/pkg/bufio/bufio.go:105 428361 bufio·*Reader·ReadSlice+0x195 /home/austin/src-go1/src/pkg/bufio/bufio.go:244 40204a ogle·Main+0x94 /home/austin/src-go1/usr/austin/ogle/cmd.go:226 40080f main·main+0xf /home/austin/src-go1/usr/austin/ogle/main.go:6 41c4b8 mainstart+0xf /home/austin/src-go1/src/pkg/runtime/amd64/asm.s:55 41531f goexit /home/austin/src-go1/src/pkg/runtime/proc.c:133 R=rsc APPROVED=rsc DELTA=433 (420 added, 2 deleted, 11 changed) OCL=34410 CL=34782
2009-09-15fixed register usage and removed some dead code.Kai Backman1-17/+5
R=rsc APPROVED=rsc DELTA=17 (0 added, 12 deleted, 5 changed) OCL=34659 CL=34665
2009-09-08pass Type* to makechan and makemap so thatRuss Cox4-31/+36
they can get the official alignment out of there instead of guessing. R=ken OCL=34450 CL=34450
2009-09-03fix range on invalid utf8 bugRuss Cox1-1/+2
R=r DELTA=42 (21 added, 20 deleted, 1 changed) OCL=34328 CL=34333
2009-08-31add newprocreadylocked for debuggerRuss Cox1-1/+10
R=austin DELTA=10 (9 added, 0 deleted, 1 changed) OCL=34163 CL=34166
2009-08-31use correct pc for printing fn+%#x in tracebacksRuss Cox2-10/+12
R=austin DELTA=12 (2 added, 0 deleted, 10 changed) OCL=34098 CL=34120
2009-08-28sliceslice inlineKen Thompson1-0/+6
R=rsc OCL=34041 CL=34041
2009-08-26recycle G structsRuss Cox1-0/+1
R=r DELTA=1 (1 added, 0 deleted, 0 changed) OCL=33887 CL=33904
2009-08-26finish ChanValue: Len and Cap.Russ Cox3-0/+22
R=r DELTA=45 (45 added, 0 deleted, 0 changed) OCL=33873 CL=33881
2009-08-26add Close() and Closed() to ChanValueRuss Cox3-5/+25
R=r DELTA=60 (56 added, 3 deleted, 1 changed) OCL=33868 CL=33872
2009-08-25rename runtime internals to have modern names (array->slice etc)Rob Pike12-75/+75
R=rsc DELTA=444 (179 added, 177 deleted, 88 changed) OCL=33847 CL=33849
2009-08-25checkpoint & test (pidigits) before trying to automate.Russ Cox2-0/+14
R=r DELTA=616 (598 added, 11 deleted, 7 changed) OCL=33846 CL=33848
2009-08-24start of FFI support, and a demo.Russ Cox4-2/+81
R=r DELTA=494 (492 added, 0 deleted, 2 changed) OCL=33784 CL=33810
2009-08-24linker workRuss Cox1-0/+7
* 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-08-20FFI step 2: can ask for libc.so.6.Russ Cox1-1/+2
introduced explicit "data" symbol instead of etext to mark beginning of data, so that using larger alignment (i.e. 4MB like GNU loader) doesn't confuse garbage collector. split dodata into dodata and dobss in preparation for putting the dynamic data + headers in the data segment instead of stuffed at the beginning of the binary. R=r DELTA=52 (37 added, 3 deleted, 12 changed) OCL=33610 CL=33618
2009-08-20len and cap on chansRuss Cox1-2/+2
R=ken OCL=33599 CL=33599
2009-08-17Removing dead tests from chan.cBill Neubauer1-4/+0
Since pres != nil was already checked and the routine sets *pres to false and returns, the subsequent tests are unneeded. R=rsc APPROVED=rsc DELTA=4 (0 added, 4 deleted, 0 changed) OCL=33439 CL=33441