runtime: add lock-free stack

This is factored out part of the:
https://golang.org/cl/5279048/
(parallel GC)

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5993043
This commit is contained in:
Dmitriy Vyukov 2012-04-12 11:49:25 +04:00
parent 2d0d3d8f9e
commit a5dc7793c0
4 changed files with 222 additions and 0 deletions

View file

@ -25,3 +25,14 @@ var Entersyscall = entersyscall
var Exitsyscall = exitsyscall
var LockedOSThread = golockedOSThread
var Stackguard = stackguard
type LFNode struct {
Next *LFNode
Pushcnt uintptr
}
func lfstackpush(head *uint64, node *LFNode)
func lfstackpop2(head *uint64) *LFNode
var LFStackPush = lfstackpush
var LFStackPop = lfstackpop2