• Dmitriy Vyukov's avatar
    runtime: convert forcegc helper to Go · 42486ffc
    Dmitriy Vyukov authored
    Also fix a bunch of bugs:
    1. Accesses to last_gc must be atomic (it's int64).
    2. last_gc still can be 0 during first checks in sysmon, check for 0.
    3. forcegc.g can be unitialized when sysmon accesses it:
            forcegc.g is initialized by main goroutine (forcegc.g = newproc1(...)),
            and main goroutine is unsynchronized with both sysmon and forcegc goroutine.
            Initialize forcegc.g in the forcegc goroutine itself instead.
    
    LGTM=khr
    R=golang-codereviews, khr
    CC=golang-codereviews, rsc
    https://golang.org/cl/136770043
    42486ffc
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...