]> Cypherpunks repositories - gostls13.git/commit
runtime: simplify NetBSD semaphores
authorMatthew Dempsky <mdempsky@google.com>
Mon, 23 Feb 2015 08:05:30 +0000 (17:05 +0900)
committerJoel Sing <jsing@google.com>
Wed, 25 Feb 2015 03:02:28 +0000 (03:02 +0000)
commit2fdb728d01df54ee2c9c9b80e75d7bee19727af6
tree18c1473bdbf34dcb6e9752b63e1f732e4ca4b93c
parentc123a800633532a4051eebf8ab9ba695ae46013b
runtime: simplify NetBSD semaphores

NetBSD's semaphore implementation is derived from OpenBSD's, but has
subsequently diverged due to cleanups that were only applied to the
latter (https://golang.org/cl/137960043, https://golang.org/cl/5563).
This CL applies analogous cleanups for NetBSD.

Notably, we can also remove the scary NetBSD deadlock warning.
NetBSD's manual pages document that lwp_unpark on a not-yet-parked LWP
will cause that LWP's next lwp_park system call to return immediately,
so there's no race hazard.

Change-Id: Ib06844c420d2496ac289748eba13eb4700bbbbb2
Reviewed-on: https://go-review.googlesource.com/5564
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Reviewed-by: Joel Sing <jsing@google.com>
src/runtime/os1_netbsd.go