summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/runtime.h
AgeCommit message (Collapse)AuthorFilesLines
2011-09-13Imported Upstream version 60upstream/60Ondřej Surý1-0/+635
2011-09-13Imported Upstream version 60Ondřej Surý1-608/+0
2011-08-03Imported Upstream version 59upstream/59Ondřej Surý1-0/+8
2011-06-30Imported Upstream version 58upstream/58Ondřej Surý1-15/+2
2011-04-28Imported Upstream version 2011.04.27upstream/2011.04.27Ondřej Surý1-2/+4
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý1-9/+8
2011-04-20Imported Upstream version 2011.03.07.1upstream/2011.03.07.1Ondřej Surý1-76/+16
2011-02-18Imported Upstream version 2011.02.15upstream/2011.02.15Ondřej Surý1-2/+2
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý1-17/+97
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-189/+189
2010-06-28Only catch all signals if os/signal package imported.Ian Lance Taylor1-1/+1
Fixes issue 776. R=rsc CC=golang-dev http://codereview.appspot.com/1745041
2010-05-19runtime: avoid allocation for fixed stringsRuss Cox1-0/+1
R=r CC=golang-dev http://codereview.appspot.com/1083041
2010-05-06runtime.GOMAXPROCS: hack it to have it return the old value.Rob Pike1-0/+1
R=rsc CC=golang-dev http://codereview.appspot.com/1140041
2010-05-01gc: be pickier about slice, chan, array, and map sizesRuss Cox1-2/+2
Fixes issue 589. R=ken2 CC=golang-dev http://codereview.appspot.com/1032044
2010-04-29rename GOOS=mingw to GOOS=windowsAlex Brainman1-2/+2
R=rsc, Joe Poirier CC=golang-dev http://codereview.appspot.com/1015043 Committer: Russ Cox <rsc@golang.org>
2010-04-15support for printing floats:Kai Backman1-0/+1
fmt.Printf("float32 %f\n", float32(1234.56789)) fmt.Printf("float64 %f\n", float64(1234.56789)) -> float32 1234.567871 float64 1234.567890 this is a snapshot. extended instruction support, corner cases and fixes coming in subseuent cls. R=rsc CC=dpx, golang-dev http://codereview.appspot.com/876045
2010-04-09runtime: delete malx, skip_depth argument to mallocRuss Cox1-1/+0
remove internal functions from traces in gopprof instead. R=r CC=golang-dev http://codereview.appspot.com/855046
2010-04-09Library support for cgo export.Ian Lance Taylor1-2/+3
These functions are used to call from a C function back to a Go function. This only includes 386 support. R=rsc CC=golang-dev http://codereview.appspot.com/834045
2010-04-08runtime: turn divide by zero, nil dereference into panicsRuss Cox1-0/+4
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 http://codereview.appspot.com/906041
2010-04-08runtime: fix bad status throwRuss Cox1-0/+4
when garbage collector sees recovering goroutine Fixes issue 711. R=r CC=golang-dev http://codereview.appspot.com/869045
2010-04-05runtime: handle malloc > 2GB correctlyRuss Cox1-1/+1
R=ken2 CC=golang-dev http://codereview.appspot.com/821048
2010-04-05runtime: various arm fixesRuss Cox1-1/+1
* 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 http://codereview.appspot.com/884041
2010-04-01runtime: turn run time errors checks into panicsRuss Cox1-2/+6
R=ken2, r CC=golang-dev http://codereview.appspot.com/871042 Committer: Russ Cox <rsc@golang.org>
2010-03-31runtime: make type assertion a runtime.Error, the first of manyRuss Cox1-3/+9
R=r CC=golang-dev http://codereview.appspot.com/805043
2010-03-31gc: implement panic and recoverRuss Cox1-1/+19
R=ken2, r, ken3 CC=golang-dev http://codereview.appspot.com/831042
2010-03-30gc: add panic and recover (still unimplemented in runtime)Russ Cox1-1/+3
main semantic change is to enforce single argument to panic. runtime: change to 1-argument panic. use String method on argument if it has one. R=ken2, r CC=golang-dev http://codereview.appspot.com/812043
2010-03-29runtime: run deferred calls at GoexitRuss Cox1-0/+1
baby step toward panic+recover. Fixes issue 349. R=r CC=golang-dev http://codereview.appspot.com/825043
2010-03-26runtime: run all finalizers in a single goroutine.Russ Cox1-1/+4
eliminate second pass of mark+sweep by scanning finalizer table specially. R=r CC=golang-dev http://codereview.appspot.com/782041
2010-03-24runtime: malloc sampling, pprof interfaceRuss Cox1-7/+6
R=r CC=golang-dev http://codereview.appspot.com/719041
2010-03-23runtime: add memory profiling, disabled.Russ Cox1-1/+2
no way to get the data out yet. add prototype for runtime.Callers, missing from last CL. R=r CC=golang-dev http://codereview.appspot.com/713041
2010-03-23runtime: add CallersRuss Cox1-0/+1
cut copies of traceback from 6 to 1. R=r CC=golang-dev http://codereview.appspot.com/703041
2010-02-19fixed bug in mpconst float multiply by 0.Ken Thompson1-1/+15
more complex -- constants, variables and print. R=rsc CC=golang-dev http://codereview.appspot.com/217061
2010-02-08runtime: allow arbitrary return type in SetFinalizer.Russ Cox1-1/+3
finalize chan, to free OS X semaphore inside Lock. os: finalize File, to close fd. Fixes issue 503. R=ken2 CC=golang-dev http://codereview.appspot.com/204065
2010-02-08runtime: instrument malloc + garbage collector.Russ Cox1-0/+2
add simple garbage collection benchmark. R=iant CC=golang-dev http://codereview.appspot.com/204053
2010-02-06fix commentKai Backman1-1/+1
R=rsc CC=golang-dev http://codereview.appspot.com/203053
2010-02-03finalizers; merge package malloc into package runtimeRuss Cox1-0/+1
R=r, cw CC=golang-dev http://codereview.appspot.com/198085
2010-01-27gc: implement defer print/println/panic/paniclnRuss Cox1-0/+1
Fixes issue 219. R=ken2, r CC=golang-dev http://codereview.appspot.com/194097
2010-01-25in C and asm, replace pkg·name with ·nameRuss Cox1-18/+18
(eliminate assumption of package global name space, make code easier to move between packages). R=r CC=golang-dev http://codereview.appspot.com/194072
2010-01-09runtime: check for preemption due to garbage collectionRuss Cox1-0/+1
in various already expensive routines. helps keep cpu utilization up when GOMAXPROCS > 1, but not a full solution. http://groups.google.com/group/golang-nuts/t/7a9535c4136d3e2 R=r CC=golang-dev http://codereview.appspot.com/184043
2010-01-06Ported runtime to Windows.Hector Chu1-0/+13
R=rsc CC=golang-dev http://codereview.appspot.com/176066 Committer: Russ Cox <rsc@golang.org>
2009-12-18runtime: fix race conditionAdam Langley1-1/+1
(Thanks to ken and rsc for pointing this out) rsc: ken pointed out that there's a race in the new one-lock-per-channel code. the issue is that if one goroutine has gone to sleep doing select { case <-c1: case <-c2: } and then two more goroutines try to send on c1 and c2 simultaneously, the way that the code makes sure only one wins is the selgen field manipulation in dequeue: // if sgp is stale, ignore it if(sgp->selgen != sgp->g->selgen) { //prints("INVALID PSEUDOG POINTER\n"); freesg(c, sgp); goto loop; } // invalidate any others sgp->g->selgen++; but because the global lock is gone both goroutines will be fiddling with sgp->g->selgen at the same time. This results in a 7% slowdown in the single threaded case for a ping-pong microbenchmark. Since the cas predominantly succeeds, adding a simple check first didn't make any difference. R=rsc CC=golang-dev http://codereview.appspot.com/180068
2009-12-16runtime: if os/signal is not in use, crash onRuss Cox1-3/+3
most signals, so that ordinary programs can be killed, for example. Fixes issue 434. R=dsymonds1 CC=golang-dev, hoisie http://codereview.appspot.com/180064
2009-12-15os/signal: new packageDavid Symonds1-0/+7
Fixes issue 71. R=rsc, r http://codereview.appspot.com/162056 Committer: Russ Cox <rsc@golang.org>
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