Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Fixes issue 589.
R=ken2
CC=golang-dev
http://codereview.appspot.com/1032044
|
|
channel recv data.
R=rsc
CC=golang-dev
http://codereview.appspot.com/896041
|
|
data just read from the channel.
this will make it easier to
recognize when to garbage
collect and finalize.
R=rsc
CC=golang-dev
http://codereview.appspot.com/882043
|
|
* adds pass 3 to dequeue from channels eagerly
various other cleanup/churn:
* use switch on cas->send in each pass to
factor out common code.
* longer goto labels, commented at target
* be more agressive about can't happen:
throw instead of print + cope.
* use "select" instead of "selectgo" in errors
* use printf for debug prints when possible
R=ken2, ken3
CC=golang-dev, r
http://codereview.appspot.com/875041
|
|
check that NOSPLIT functions don't use too much stack.
correct some missing NOSPLITs in the runtime library.
Fixes bug reported in
https://groups.google.com/group/golang-nuts/t/efff68b73941eccf
R=ken2
CC=golang-dev
http://codereview.appspot.com/236041
|
|
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
|
|
(eliminate assumption of package global name space,
make code easier to move between packages).
R=r
CC=golang-dev
http://codereview.appspot.com/194072
|
|
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
|
|
(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
|
|
Fixes issue 401.
R=ken2
http://codereview.appspot.com/180053
|
|
Makes the code look cleaner, even if it's a little harder to figure
out from the sort invariants.
R=rsc
CC=golang-dev
http://codereview.appspot.com/165061
|
|
On a microbenchmark that ping-pongs on lots of channels, this makes
the multithreaded case about 20% faster and the uniprocessor case
about 1% slower. (Due to cache effects, I expect.)
R=rsc, agl
CC=golang-dev
http://codereview.appspot.com/166043
|
|
selfree maintains a cache of Select structures for several sizes. In
newselect, we'll use an entry from the cache if one is found. However,
the Scase structures corresponding to a send may have been allocated
for the wrong size. In this case we'll write off the end of the Scase
into random memory and, generally, read some amount of junk in the
receive.
This patch fixes the issue by removing the cache, on the advice of
rsc.
R=rsc
CC=go-dev
http://go/go-review/1016002
|
|
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
|
|
they can get the official alignment out of there
instead of guessing.
R=ken
OCL=34450
CL=34450
|
|
R=r
DELTA=45 (45 added, 0 deleted, 0 changed)
OCL=33873
CL=33881
|
|
R=r
DELTA=60 (56 added, 3 deleted, 1 changed)
OCL=33868
CL=33872
|
|
R=rsc
DELTA=444 (179 added, 177 deleted, 88 changed)
OCL=33847
CL=33849
|
|
R=ken
OCL=33599
CL=33599
|
|
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
|
|
introduce NodeList* type in compiler to replace OLIST.
this clarifies where lists can and cannot occur.
list append and concatenation are now cheap.
the _r rules are gone from yacc.
rev and unrev are gone.
no more lists of lists.
the representation of assignments is a bit clunkier.
split into OAS (1=1) and OAS2 (2 or more on one side).
delete dead chanrecv3 code.
delay construction of func types.
R=ken
OCL=31745
CL=31762
|
|
R=r
DELTA=188 (171 added, 6 deleted, 11 changed)
OCL=31352
CL=31361
|
|
R=ken
OCL=31125
CL=31125
|
|
input parameters, move output parameters
into their own struct.
R=ken
OCL=30954
CL=30966
|
|
tests: all.bash passes, gobuild still works, godoc still works.
R=rsc
OCL=30096
CL=30102
|