summaryrefslogtreecommitdiff
path: root/src/runtime/stack.go
diff options
context:
space:
mode:
authorRick Hudson <rlh@golang.org>2016-07-19 14:21:23 -0400
committerRick Hudson <rlh@golang.org>2017-05-25 18:05:53 +0000
commit1d4942afe0872e5f6d95cfa0a5751ef4a9dde114 (patch)
treee3eca264c83e28557f626bc4bf619f516a9e56df /src/runtime/stack.go
parent8b25a00e6d889c8a919922f747791478c8bdfe6f (diff)
downloadgo-git-dev.garbage.tar.gz
[dev.garbage] runtime: determine if an object is publicdev.garbage
ROC (request oriented collector) needs to determine if an object is visible to other goroutines, i.e. public. In a later CL this will be used by the write barrier and the publishing logic to distinguish between local and public objects and act accordingly. Change-Id: I6a80da9deb21f57e831a2ec04e41477f997a8c33 Reviewed-on: https://go-review.googlesource.com/25056 Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/stack.go')
-rw-r--r--src/runtime/stack.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/stack.go b/src/runtime/stack.go
index 0f1a5c1c55..1e59d38994 100644
--- a/src/runtime/stack.go
+++ b/src/runtime/stack.go
@@ -1225,3 +1225,8 @@ func morestackc() {
throw("attempt to execute C code on Go stack")
})
}
+
+//go:nosplit
+func inStack(p uintptr, s stack) bool {
+ return s.lo <= p && p < s.hi
+}