]> Cypherpunks repositories - gostls13.git/commit
runtime: Plan 9 - prevent preemption by GC while exiting
authorRichard Miller <miller.research@gmail.com>
Wed, 9 Mar 2016 16:16:05 +0000 (16:16 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 9 Mar 2016 16:48:00 +0000 (16:48 +0000)
commit6b59d618226259801fea6eb820587a449690261a
tree70bbe18e7917264f1a4d88c1e3ba012496c9bbff
parent87103a1ab75036530bf0757397a212ee1a9822f5
runtime: Plan 9 - prevent preemption by GC while exiting

On Plan 9, there's no "kill all threads" system call, so exit is done
by sending a "go: exit" note to each OS process.  If concurrent GC
occurs during this loop, deadlock sometimes results.  Prevent this by
incrementing m.locks before sending notes.

Change-Id: I31aa15134ff6e42d9a82f9f8a308620b3ad1b1b1
Reviewed-on: https://go-review.googlesource.com/20477
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/os1_plan9.go