]> Cypherpunks repositories - gostls13.git/commit
runtime: explictly state lock ordering direction
authorMichael Pratt <mpratt@google.com>
Fri, 17 Apr 2020 19:25:03 +0000 (15:25 -0400)
committerMichael Pratt <mpratt@google.com>
Fri, 17 Apr 2020 20:24:04 +0000 (20:24 +0000)
commit646b4ac06583396bb296f9b3f855fdab4ebe0060
treef3d8915b9f4a9cad088486933a12de8313fd3edb
parent2ff1e3ebf5de77325c0e96a6c2a229656fc7be50
runtime: explictly state lock ordering direction

At least as far as I can tell, this file never explicitly states whether
locks with higher or lower rank should be taken first. It is implied in
some comments, and clear from the code, of course.

Add an explicit comment to make things more clear and hopefully reduce
new locks being adding in the wrong spot.

Change-Id: I17c6fd5fc216954e5f3550cf91f17e25139f1587
Reviewed-on: https://go-review.googlesource.com/c/go/+/228785
Reviewed-by: Dan Scales <danscales@google.com>
src/runtime/lockrank.go