summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/runtime.h
AgeCommit message (Collapse)AuthorFilesLines
2009-12-03runtime: malloc fixesRuss Cox1-9/+0
* throw away dead code * add mlookup counter * add malloc counter * set up for blocks with no pointers Fixes issue 367. R=r http://codereview.appspot.com/165050
2009-11-20x[lo:] - gc and runtime.Russ Cox1-1/+1
* add runtime sliceslice1 for x[lo:] * remove runtime arraytoslice, rewriting &arr into arr[0:len(arr)]. * port cgen_inline into 8g, 5g. * use native memmove in maps R=ken2 http://codereview.appspot.com/157106
2009-11-18Add an intptr type to runtime; needed in FreeBSDDevon H. O'Dell1-0/+2
In thread.c, we need to cast to whatever the native size of intptr is on the system, but we only have uintptr available. They're the same size, but can't do signed casts without this one :). R=rsc CC=golang-dev http://codereview.appspot.com/156073 Committer: Russ Cox <rsc@golang.org>
2009-11-13runtime: warn about SELinux based mmap failures on Linux.Adam Langley1-0/+7
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 http://codereview.appspot.com/152086
2009-10-23fix off by 4 bug in morestack (lr again). remove storing of r0Kai Backman1-1/+0
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-15rename sys functions to runtime,Russ Cox1-31/+31
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-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 Pike1-1/+3
R=rsc DELTA=31 (5 added, 3 deleted, 23 changed) OCL=35700 CL=35700
2009-10-12stack overflow debugging and fix.Russ Cox1-1/+0
* 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-09keep a list of all the M's,Russ Cox1-0/+2
so that the garbage collector doesn't free them. R=ken OCL=35538 CL=35538
2009-10-038c, 8l dynamic loading support.Russ Cox1-3/+7
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-22changes to accommodate nacl:Russ Cox1-0/+1
* 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-08pass Type* to makechan and makemap so thatRuss Cox1-2/+2
they can get the official alignment out of there instead of guessing. R=ken OCL=34450 CL=34450
2009-08-26finish ChanValue: Len and Cap.Russ Cox1-0/+2
R=r DELTA=45 (45 added, 0 deleted, 0 changed) OCL=33873 CL=33881
2009-08-26add Close() and Closed() to ChanValueRuss Cox1-1/+3
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 Pike1-6/+6
R=rsc DELTA=444 (179 added, 177 deleted, 88 changed) OCL=33847 CL=33849
2009-08-13debugging symbols for 8g.Russ Cox1-1/+0
backtraces don't work, but they didn't work when i started either. R=ken OCL=33230 CL=33230
2009-08-11commentary about extern registerRob Pike1-3/+15
R=rsc DELTA=16 (12 added, 0 deleted, 4 changed) OCL=33030 CL=33035
2009-07-13add LockOSThread and UnlockOSThread toRuss Cox1-0/+3
runtime package for use by debugger, which needs to make sure that all ptrace calls about a given pid come from the same thread. R=r DELTA=175 (90 added, 63 deleted, 22 changed) OCL=31546 CL=31558
2009-07-10reflection for interface setRuss Cox1-0/+2
rename map access methods to Elem, SetElem. R=r DELTA=95 (66 added, 7 deleted, 22 changed) OCL=31456 CL=31469
2009-07-08reflection for functionsRuss Cox1-0/+6
add channel send type check (thanks austin). fix type mismatch message. R=r DELTA=241 (225 added, 5 deleted, 11 changed) OCL=31370 CL=31375
2009-07-08reflection for channelsRuss Cox1-0/+6
R=r DELTA=188 (171 added, 6 deleted, 11 changed) OCL=31352 CL=31361
2009-07-08reflection for mapsRuss Cox1-0/+8
R=r DELTA=304 (248 added, 34 deleted, 22 changed) OCL=31345 CL=31347
2009-07-07runtime: use new reflect data structures (CL 31107)Russ Cox1-4/+4
in place of sigi, sigt. R=ken OCL=31118 CL=31277
2009-07-02move Structrnd to runtime.hRuss Cox1-0/+5
R=ken OCL=31125 CL=31125
2009-06-30remove declarations for functions that cannot be called from cRuss Cox1-11/+0
(because they return values in the input parameters). R=iant DELTA=12 (0 added, 11 deleted, 1 changed) OCL=30952 CL=30965
2009-06-25Add Gobuf.r0 that stores arg0 or return value ofKai Backman1-0/+1
goroutine. arm only. R=rsc APPROVED=rsc DELTA=5 (3 added, 2 deleted, 0 changed) OCL=30644 CL=30746
2009-06-17Forgot to check in 386/asm.h.Russ Cox1-17/+7
Rather than do that, fix build by generating asm.h automatically. R=r DELTA=97 (48 added, 36 deleted, 13 changed) OCL=30449 CL=30452
2009-06-17runtime: stack growth adjustments, cleanupRuss Cox1-34/+43
* 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-15fix another gc bug, one that i have only imagined,Russ Cox1-0/+1
not observed: do not use malloc to allocate stacks during garbage collection, because it would make the malloc data structures change underfoot. R=r DELTA=6 (3 added, 0 deleted, 3 changed) OCL=30323 CL=30326
2009-06-09mv src/lib to src/pkgRob Pike1-0/+464
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102