@@ -323,7 +323,7 @@
/* Similarly, we can't interrupt the thread while it is building
profiling information. Otherwise we can get into a deadlock
when sweepspan calls MProf_Free. */
- __sync_bool_compare_and_swap (&pm->gcing, 0, 1);
+ __sync_bool_compare_and_swap (&pm->gcing_for_prof, 0, 1);
return;
}
@@ -208,7 +208,7 @@
unlock(&proflock);
__sync_bool_compare_and_swap(&m->nomemprof, 1, 0);
- if(__sync_bool_compare_and_swap(&m->gcing, 1, 0))
+ if(__sync_bool_compare_and_swap(&m->gcing_for_prof, 1, 0))
__go_run_goroutine_gc(100);
}
@@ -230,7 +230,7 @@
unlock(&proflock);
__sync_bool_compare_and_swap(&m->nomemprof, 1, 0);
- if(__sync_bool_compare_and_swap(&m->gcing, 1, 0))
+ if(__sync_bool_compare_and_swap(&m->gcing_for_prof, 1, 0))
__go_run_goroutine_gc(101);
}
@@ -285,7 +285,7 @@
__sync_bool_compare_and_swap(&m->nomemprof, 1, 0);
- if(__sync_bool_compare_and_swap(&m->gcing, 1, 0))
+ if(__sync_bool_compare_and_swap(&m->gcing_for_prof, 1, 0))
__go_run_goroutine_gc(102);
}
@@ -94,6 +94,7 @@
int32 gcing;
int32 locks;
int32 nomemprof;
+ int32 gcing_for_prof;
MCache *mcache;
/* For the list of all threads. */