Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime: make stack barrier locking more robust
The stack barrier locking functions use a simple cas lock because they need to support trylock, but currently don't increment g.m.locks. This is okay right now because they always run on the system stack or the signal stack and are hence non-preemtible, but this could lead to difficult-to-reproduce deadlocks if these conditions change in the future. Make these functions more robust by incrementing g.m.locks and making them nosplit to enforce non-preemtibility. Change-Id: I73d60a35bd2ad2d81c73aeb20dbd37665730eb1b Reviewed-on: https://go-review.googlesource.com/17058 Run-TryBot: Austin Clements <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ingo Oeser <[email protected]> Reviewed-by: Russ Cox <[email protected]>
- Loading branch information