• Russ Cox's avatar
    runtime: replace func-based write barrier skipping with type-based · 181e26b9
    Russ Cox authored
    This CL revises CL 7504 to use explicitly uintptr types for the
    struct fields that are going to be updated sometimes without
    write barriers. The result is that the fields are now updated *always*
    without write barriers.
    
    This approach has two important properties:
    
    1) Now the GC never looks at the field, so if the missing reference
    could cause a problem, it will do so all the time, not just when the
    write barrier is missed at just the right moment.
    
    2) Now a write barrier never happens for the field, avoiding the
    (correct) detection of inconsistent write barriers when GODEBUG=wbshadow=1.
    
    Change-Id: Iebd3962c727c0046495cc08914a8dc0808460e0e
    Reviewed-on: https://go-review.googlesource.com/9019Reviewed-by: 's avatarAustin Clements <austin@google.com>
    Run-TryBot: Russ Cox <rsc@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    181e26b9
netpoll_windows.go 3.6 KB