Skip to content

Commit 7769be7

Browse files
committed
[release-branch.go1.3] undo 941ef9ddbada / 125150044
It broke the build across all platforms. The original change wasn't even reviewed. Probably should never have been ported to this branch. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/128130043
1 parent df7a37e commit 7769be7

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/pkg/runtime/mgc0.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2760,7 +2760,7 @@ runtime·markscan(void *v)
27602760
void
27612761
runtime·markfreed(void *v)
27622762
{
2763-
uintptr *b, off, shift, xbits;
2763+
uintptr *b, off, shift;
27642764

27652765
if(0)
27662766
runtime·printf("markfreed %p\n", v);
@@ -2771,18 +2771,7 @@ runtime·markfreed(void *v)
27712771
off = (uintptr*)v - (uintptr*)runtime·mheap.arena_start; // word offset
27722772
b = (uintptr*)runtime·mheap.arena_start - off/wordsPerBitmapWord - 1;
27732773
shift = off % wordsPerBitmapWord;
2774-
if(!g->m->gcing || work.nproc == 1) {
2775-
// During normal operation (not GC), the span bitmap is not updated concurrently,
2776-
// because either the span is cached or accesses are protected with MCentral lock.
2777-
*b = (*b & ~(bitMask<<shift)) | (bitAllocated<<shift);
2778-
} else {
2779-
// During GC other threads concurrently mark heap.
2780-
for(;;) {
2781-
xbits = *b;
2782-
if(runtime·casp((void**)b, (void*)xbits, (void*)((xbits & ~(bitMask<<shift)) | (bitAllocated<<shift))))
2783-
break;
2784-
}
2785-
}
2774+
*b = (*b & ~(bitMask<<shift)) | (bitAllocated<<shift);
27862775
}
27872776

27882777
// check that the block at v of size n is marked freed.

0 commit comments

Comments
 (0)