From: Dmitriy Vyukov Date: Tue, 11 Mar 2014 13:35:49 +0000 (+0400) Subject: runtime: remove atomic CAS loop from marknogc X-Git-Tag: go1.3beta1~400 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3877f1d9c80f57beb8a8dde778f6239598fd4a58;p=gostls13.git runtime: remove atomic CAS loop from marknogc Spans are now private to threads, and the loop is removed from all other functions. Remove it from marknogc for consistency. LGTM=khr, rsc R=golang-codereviews, bradfitz, khr CC=golang-codereviews, khr, rsc https://golang.org/cl/72520043 --- diff --git a/src/pkg/runtime/mgc0.c b/src/pkg/runtime/mgc0.c index 3c74417893..0bb2badde5 100644 --- a/src/pkg/runtime/mgc0.c +++ b/src/pkg/runtime/mgc0.c @@ -2614,26 +2614,12 @@ runfinq(void) void runtime·marknogc(void *v) { - uintptr *b, obits, bits, off, shift; + uintptr *b, off, shift; off = (uintptr*)v - (uintptr*)runtime·mheap.arena_start; // word offset b = (uintptr*)runtime·mheap.arena_start - off/wordsPerBitmapWord - 1; shift = off % wordsPerBitmapWord; - - for(;;) { - obits = *b; - if((obits>>shift & bitMask) != bitAllocated) - runtime·throw("bad initial state for marknogc"); - bits = (obits & ~(bitAllocated<