mirror of
https://github.com/golang/go
synced 2024-11-05 15:06:09 -07:00
runtime: allow stack split in body of closechan
This gives more space during the call to runtime.lock. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/11679043
This commit is contained in:
parent
27134567fa
commit
10d1e55103
@ -1214,10 +1214,27 @@ reflect·rselect(Slice cases, intgo chosen, uintptr word, bool recvOK)
|
||||
FLUSH(&recvOK);
|
||||
}
|
||||
|
||||
static void closechan(Hchan *c, void *pc);
|
||||
|
||||
// closechan(sel *byte);
|
||||
#pragma textflag 7
|
||||
void
|
||||
runtime·closechan(Hchan *c)
|
||||
{
|
||||
closechan(c, runtime·getcallerpc(&c));
|
||||
}
|
||||
|
||||
// For reflect
|
||||
// func chanclose(c chan)
|
||||
#pragma textflag 7
|
||||
void
|
||||
reflect·chanclose(Hchan *c)
|
||||
{
|
||||
closechan(c, runtime·getcallerpc(&c));
|
||||
}
|
||||
|
||||
static void
|
||||
closechan(Hchan *c, void *pc)
|
||||
{
|
||||
SudoG *sg;
|
||||
G* gp;
|
||||
@ -1235,7 +1252,7 @@ runtime·closechan(Hchan *c)
|
||||
}
|
||||
|
||||
if(raceenabled) {
|
||||
runtime·racewritepc(c, runtime·getcallerpc(&c), runtime·closechan);
|
||||
runtime·racewritepc(c, pc, runtime·closechan);
|
||||
runtime·racerelease(c);
|
||||
}
|
||||
|
||||
@ -1264,14 +1281,6 @@ runtime·closechan(Hchan *c)
|
||||
runtime·unlock(c);
|
||||
}
|
||||
|
||||
// For reflect
|
||||
// func chanclose(c chan)
|
||||
void
|
||||
reflect·chanclose(Hchan *c)
|
||||
{
|
||||
runtime·closechan(c);
|
||||
}
|
||||
|
||||
// For reflect
|
||||
// func chanlen(c chan) (len int)
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user