n = 0;
while(stk) {
if(sp < guard-StackGuard || (byte*)stk < sp) {
- runtime·printf("scanstack inconsistent: g%d#%d sp=%p not in [%p,%p]\n", gp->goid, n, sp, guard-StackGuard, stk);
+ runtime·printf("scanstack inconsistent: g%D#%d sp=%p not in [%p,%p]\n", gp->goid, n, sp, guard-StackGuard, stk);
runtime·throw("scanstack");
}
addroot(sp, (byte*)stk - sp);
Lock;
G *gfree; // available g's (status == Gdead)
- int32 goidgen;
+ int64 goidgen;
G *ghead; // g's waiting to run
G *gtail;
status = "???";
break;
}
- runtime·printf("goroutine %d [%s]:\n", gp->goid, status);
+ runtime·printf("goroutine %D [%s]:\n", gp->goid, status);
}
void
// If g is the idle goroutine for an m, hand it off.
if(gp->idlem != nil) {
if(gp->idlem->idleg != nil) {
- runtime·printf("m%d idle out of sync: g%d g%d\n",
+ runtime·printf("m%d idle out of sync: g%D g%D\n",
gp->idlem->id,
gp->idlem->idleg->goid, gp->goid);
runtime·throw("runtime: double idle");
// Mark runnable.
if(gp->status == Grunnable || gp->status == Grunning) {
- runtime·printf("goroutine %d has status %d\n", gp->goid, gp->status);
+ runtime·printf("goroutine %D has status %d\n", gp->goid, gp->status);
runtime·throw("bad g->status in ready");
}
gp->status = Grunnable;
uintptr cret;
byte *sp;
G *g1;
- int32 goid;
+ int64 goid;
//printf("oldstack m->cret=%p\n", m->cret);
byte *sp;
G *newg;
int32 siz;
- int32 goid;
+ int64 goid;
//printf("newproc1 %p %p narg=%d nret=%d\n", fn, argp, narg, nret);
siz = narg + nret;
if(siz > StackMin - 1024)
runtime·throw("runtime.newproc: function arguments too large for new goroutine");
- goid = runtime·xadd((uint32*)&runtime·sched.goidgen, 1);
+ goid = runtime·xadd64((uint64*)&runtime·sched.goidgen, 1);
if(raceenabled)
runtime·racegostart(goid, callerpc);
G* alllink; // on allg
void* param; // passed parameter on wakeup
int16 status;
- int32 goid;
+ int64 goid;
uint32 selgen; // valid sudog pointer
int8* waitreason; // if status==Gwaiting
G* schedlink;
waspanic = f->entry == (uintptr)runtime·sigpanic;
if(pcbuf == nil && f->entry == (uintptr)runtime·newstack && g == m->g0) {
- runtime·printf("----- newstack called from goroutine %d -----\n", m->curg->goid);
+ runtime·printf("----- newstack called from goroutine %D -----\n", m->curg->goid);
pc = (uintptr)m->morepc;
sp = (byte*)m->moreargp - sizeof(void*);
lr = (uintptr)m->morebuf.pc;
}
if(pcbuf == nil && f->entry == (uintptr)runtime·lessstack && g == m->g0) {
- runtime·printf("----- lessstack called from goroutine %d -----\n", m->curg->goid);
+ runtime·printf("----- lessstack called from goroutine %D -----\n", m->curg->goid);
g = m->curg;
stk = (Stktop*)g->stackbase;
sp = (byte*)stk->gobuf.sp;
// The fact that we saw newstack means that morestack
// has managed to record its information in m, so we can
// use it to keep unwinding the stack.
- runtime·printf("----- morestack called from goroutine %d -----\n", m->curg->goid);
+ runtime·printf("----- morestack called from goroutine %D -----\n", m->curg->goid);
pc = (uintptr)m->morepc;
sp = (byte*)m->morebuf.sp - sizeof(void*);
lr = (uintptr)m->morebuf.pc;
if(pcbuf == nil && f->entry == (uintptr)runtime·lessstack && g == m->g0) {
// Lessstack is running on scheduler stack. Switch to original goroutine.
- runtime·printf("----- lessstack called from goroutine %d -----\n", m->curg->goid);
+ runtime·printf("----- lessstack called from goroutine %D -----\n", m->curg->goid);
g = m->curg;
stk = (Stktop*)g->stackbase;
sp = (byte*)stk->gobuf.sp;