aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/lfstack.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/lfstack.go')
-rw-r--r--src/runtime/lfstack.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/lfstack.go b/src/runtime/lfstack.go
index 1261f54d97..db54ecb05e 100644
--- a/src/runtime/lfstack.go
+++ b/src/runtime/lfstack.go
@@ -3,6 +3,9 @@
// license that can be found in the LICENSE file.
// Lock-free stack.
+// Initialize head to 0, compare with 0 to test for emptiness.
+// The stack does not keep pointers to nodes,
+// so they can be garbage collected if there are no other pointers to nodes.
// The following code runs only on g0 stack.
package runtime