File tree 4 files changed +19
-408
lines changed
4 files changed +19
-408
lines changed Original file line number Diff line number Diff line change @@ -4410,44 +4410,23 @@ func checkdead() {
4410
4410
}
4411
4411
4412
4412
// Maybe jump time forward for playground.
4413
- if oldTimers {
4414
- gp := timejumpOld ()
4415
- if gp != nil {
4416
- casgstatus (gp , _Gwaiting , _Grunnable )
4417
- globrunqput (gp )
4418
- _p_ := pidleget ()
4419
- if _p_ == nil {
4420
- throw ("checkdead: no p for timer" )
4421
- }
4422
- mp := mget ()
4423
- if mp == nil {
4424
- // There should always be a free M since
4425
- // nothing is running.
4426
- throw ("checkdead: no m for timer" )
4413
+ _p_ := timejump ()
4414
+ if _p_ != nil {
4415
+ for pp := & sched .pidle ; * pp != 0 ; pp = & (* pp ).ptr ().link {
4416
+ if (* pp ).ptr () == _p_ {
4417
+ * pp = _p_ .link
4418
+ break
4427
4419
}
4428
- mp .nextp .set (_p_ )
4429
- notewakeup (& mp .park )
4430
- return
4431
4420
}
4432
- } else {
4433
- _p_ := timejump ()
4434
- if _p_ != nil {
4435
- for pp := & sched .pidle ; * pp != 0 ; pp = & (* pp ).ptr ().link {
4436
- if (* pp ).ptr () == _p_ {
4437
- * pp = _p_ .link
4438
- break
4439
- }
4440
- }
4441
- mp := mget ()
4442
- if mp == nil {
4443
- // There should always be a free M since
4444
- // nothing is running.
4445
- throw ("checkdead: no m for timer" )
4446
- }
4447
- mp .nextp .set (_p_ )
4448
- notewakeup (& mp .park )
4449
- return
4421
+ mp := mget ()
4422
+ if mp == nil {
4423
+ // There should always be a free M since
4424
+ // nothing is running.
4425
+ throw ("checkdead: no m for timer" )
4450
4426
}
4427
+ mp .nextp .set (_p_ )
4428
+ notewakeup (& mp .park )
4429
+ return
4451
4430
}
4452
4431
4453
4432
// There are no goroutines running, so we can look at the P's.
You can’t perform that action at this time.
0 commit comments