]> Cypherpunks repositories - gostls13.git/commit
runtime: unset m->locks after actual lock unlock
authorDmitriy Vyukov <dvyukov@google.com>
Wed, 15 May 2013 12:48:41 +0000 (16:48 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Wed, 15 May 2013 12:48:41 +0000 (16:48 +0400)
commit764bb36ea2be3fd9c04a0a485524a75241c21b8a
tree98d49f6612f28a0d237687179b9f4ac7acc271fb
parente69012ce2a366e54bc86cd17f2fb1d73fc567a89
runtime: unset m->locks after actual lock unlock
This is needed for preemptive scheduler,
it will preempt only when m->locks==0,
and we do not want to be preempted while
we have not completely unlocked the lock.

R=golang-dev, khr, iant
CC=golang-dev
https://golang.org/cl/9196047
src/pkg/runtime/lock_futex.c
src/pkg/runtime/lock_sema.c