• Bryan C. Mills's avatar
    runtime: fix _cgo_yield usage with sysmon and on BSD · e57350f4
    Bryan C. Mills authored
    There are a few problems from change 35494, discovered during testing
    of change 37852.
    
    1. I was confused about the usage of n.key in the sema variant, so we
       were looping on the wrong condition. The error was not caught by
       the TryBots (presumably due to missing TSAN coverage in the BSD and
       darwin builders?).
    
    2. The sysmon goroutine sometimes skips notetsleep entirely, using
       direct usleep syscalls instead. In that case, we were not calling
       _cgo_yield, leading to missed signals under TSAN.
    
    3. Some notetsleep calls have long finite timeouts. They should be
       broken up into smaller chunks with a yield at the end of each
       chunk.
    
    updates #18717
    
    Change-Id: I91175af5dea3857deebc686f51a8a40f9d690bcc
    Reviewed-on: https://go-review.googlesource.com/37867
    Run-TryBot: Bryan Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    e57350f4
Name
Last commit
Last update
..
errors Loading commit data...
fortran Loading commit data...
gmp Loading commit data...
life Loading commit data...
nocgo Loading commit data...
stdio Loading commit data...
test Loading commit data...
testasan Loading commit data...
testcarchive Loading commit data...
testcshared Loading commit data...
testgodefs Loading commit data...
testplugin Loading commit data...
testsanitizers Loading commit data...
testshared Loading commit data...
testsigfwd Loading commit data...
testso Loading commit data...
testsovar Loading commit data...
testtls Loading commit data...