Commit b21425dd authored by Russ Cox's avatar Russ Cox

runtime gc bug.

semacquire might move to another m.

R=r
DELTA=5  (2 added, 2 deleted, 1 changed)
OCL=33317
CL=33326
parent 4023dce7
......@@ -221,8 +221,8 @@ gc(int32 force)
return;
//printf("gc...\n");
m->gcing = 1;
semacquire(&gcsema);
m->gcing = 1;
stoptheworld();
if(mheap.Lock.key != 0)
throw("mheap locked during gc");
......@@ -232,6 +232,6 @@ gc(int32 force)
mstats.next_gc = mstats.inuse_pages+mstats.inuse_pages*gcpercent/100;
}
starttheworld();
semrelease(&gcsema);
m->gcing = 0;
semrelease(&gcsema);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment