]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: make notetsleep_internal nowritebarrier
authorAustin Clements <austin@google.com>
Fri, 24 Jul 2015 19:38:16 +0000 (15:38 -0400)
committerAustin Clements <austin@google.com>
Mon, 27 Jul 2015 19:58:58 +0000 (19:58 +0000)
When notetsleep_internal is called from notetsleepg, notetsleepg has
just given up the P, so write barriers are not allowed in
notetsleep_internal.

Change-Id: I1b214fa388b1ea05b8ce2dcfe1c0074c0a3c8870
Reviewed-on: https://go-review.googlesource.com/12647
Reviewed-by: Rick Hudson <rlh@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/lock_futex.go

index 1765a6ce66aacda079ec449e09e2c219790bf661..768fd5769f04e29734b248d8608fafeab608f8f7 100644 (file)
@@ -144,7 +144,11 @@ func notesleep(n *note) {
        }
 }
 
+// May run with m.p==nil if called from notetsleep, so write barriers
+// are not allowed.
+//
 //go:nosplit
+//go:nowritebarrier
 func notetsleep_internal(n *note, ns int64) bool {
        gp := getg()