diff options
Diffstat (limited to 'src/runtime/lfstack_amd64.go')
-rw-r--r-- | src/runtime/lfstack_amd64.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/runtime/lfstack_amd64.go b/src/runtime/lfstack_amd64.go new file mode 100644 index 000000000..124555781 --- /dev/null +++ b/src/runtime/lfstack_amd64.go @@ -0,0 +1,12 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package runtime + +// Amd64 uses 48-bit virtual addresses, 47-th bit is used as kernel/user flag. +// So we use 17msb of pointers as ABA counter. +const ( + lfPtrBits = 47 + lfCountMask = 1<<17 - 1 +) |