diff options
author | Andrew Gerrand <adg@golang.org> | 2014-08-13 13:38:50 +1000 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2014-08-13 13:38:50 +1000 |
commit | 7769be7d2f10cedc653d654b6c9924bcbf5d4480 (patch) | |
tree | 62367a9618b6054f567e629f2a09492f0576e7d1 | |
parent | df7a37efd74b3b9bca093eadf0ed596c745efce6 (diff) | |
download | go-7769be7d2f10cedc653d654b6c9924bcbf5d4480.tar.gz go-7769be7d2f10cedc653d654b6c9924bcbf5d4480.zip |
[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
-rw-r--r-- | src/pkg/runtime/mgc0.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/pkg/runtime/mgc0.c b/src/pkg/runtime/mgc0.c index 9b23c53c21..392da535b1 100644 --- a/src/pkg/runtime/mgc0.c +++ b/src/pkg/runtime/mgc0.c @@ -2760,7 +2760,7 @@ runtime·markscan(void *v) void runtime·markfreed(void *v) { - uintptr *b, off, shift, xbits; + uintptr *b, off, shift; if(0) runtime·printf("markfreed %p\n", v); @@ -2771,18 +2771,7 @@ runtime·markfreed(void *v) off = (uintptr*)v - (uintptr*)runtime·mheap.arena_start; // word offset b = (uintptr*)runtime·mheap.arena_start - off/wordsPerBitmapWord - 1; shift = off % wordsPerBitmapWord; - if(!g->m->gcing || work.nproc == 1) { - // During normal operation (not GC), the span bitmap is not updated concurrently, - // because either the span is cached or accesses are protected with MCentral lock. - *b = (*b & ~(bitMask<<shift)) | (bitAllocated<<shift); - } else { - // During GC other threads concurrently mark heap. - for(;;) { - xbits = *b; - if(runtime·casp((void**)b, (void*)xbits, (void*)((xbits & ~(bitMask<<shift)) | (bitAllocated<<shift)))) - break; - } - } + *b = (*b & ~(bitMask<<shift)) | (bitAllocated<<shift); } // check that the block at v of size n is marked freed. |