mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: convert common scheduler functions to Go
These are required for chans, semaphores, timers, etc. LGTM=khr R=golang-codereviews, khr CC=golang-codereviews, rlh, rsc https://golang.org/cl/123640043
This commit is contained in:
parent
6b112c24db
commit
684de04118
20 changed files with 175 additions and 50 deletions
|
|
@ -343,7 +343,7 @@ runtime·oldstack(void)
|
|||
gp->sched.ret = g->m->cret;
|
||||
g->m->cret = 0; // drop reference
|
||||
gp->status = Gwaiting;
|
||||
gp->waitreason = "stack unsplit";
|
||||
gp->waitreason = runtime·gostringnocopy((byte*)"stack unsplit");
|
||||
|
||||
if(argsize > 0) {
|
||||
sp -= argsize;
|
||||
|
|
@ -860,7 +860,7 @@ runtime·newstack(void)
|
|||
g->m->morebuf.lr = (uintptr)nil;
|
||||
g->m->morebuf.sp = (uintptr)nil;
|
||||
gp->status = Gwaiting;
|
||||
gp->waitreason = "stack growth";
|
||||
gp->waitreason = runtime·gostringnocopy((byte*)"stack growth");
|
||||
newstackcall = framesize==1;
|
||||
if(newstackcall)
|
||||
framesize = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue