Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(628)

Unified Diff: src/pkg/runtime/panic.c

Issue 132960044: code review 132960044: runtime: changes to g->atomicstatus (nee status) to sup... (Closed)
Patch Set: diff -r 53cc52c4a1dec1ea8ad862af822d1478b24f3d52 https://code.google.com/p/go/ Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/runtime/mprof.goc ('k') | src/pkg/runtime/proc.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/runtime/panic.c
===================================================================
--- a/src/pkg/runtime/panic.c
+++ b/src/pkg/runtime/panic.c
@@ -477,6 +477,7 @@
runtime·canpanic(G *gp)
{
M *m;
+ uint32 status;
// Note that g is m->gsignal, different from gp.
// Note also that g->m can change at preemption, so m can go stale
@@ -490,7 +491,8 @@
return false;
if(m->locks-m->softfloat != 0 || m->mallocing != 0 || m->throwing != 0 || m->gcing != 0 || m->dying != 0)
return false;
- if(gp->status != Grunning || gp->syscallsp != 0)
+ status = runtime·readgstatus(gp);
+ if((status&~Gscan) != Grunning || gp->syscallsp != 0)
return false;
#ifdef GOOS_windows
if(m->libcallsp != 0)
« no previous file with comments | « src/pkg/runtime/mprof.goc ('k') | src/pkg/runtime/proc.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b