Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(460)

Issue 7225043: code review 7225043: runtime: use new CNT_MASK in lfstack (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 5 months ago by iant
Modified:
12 years, 5 months ago
Reviewers:
CC:
dvyukov, golang-dev
Visibility:
Public.

Description

runtime: use new CNT_MASK in lfstack This is for SPARC64, a 64-bit processor that uses all 64-bits of virtual addresses. The idea is to use the low order 3 bits to at least get a small ABA counter. That should work since pointers are aligned. The idea is for SPARC64 to set CNT_MASK == 7, PTR_BITS == 0, PTR_MASK == 0xffffffffffffff8. Also add uintptr casts to avoid GCC warnings. The gccgo runtime code is compiled with GCC, and GCC warns when casting between a pointer and a type of a different size.

Patch Set 1 #

Patch Set 2 : diff -r 6b7f0677efb3 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -5 lines) Patch
M src/pkg/runtime/lfstack.c View 2 chunks +6 lines, -5 lines 0 comments Download

Messages

Total messages: 3
iant
Hello dvyukov@google.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
12 years, 5 months ago (2013-01-25 23:36:32 UTC) #1
dvyukov
LGTM
12 years, 5 months ago (2013-01-26 09:06:51 UTC) #2
iant
12 years, 5 months ago (2013-01-27 02:16:46 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=aee6d7fe395a ***

runtime: use new CNT_MASK in lfstack

This is for SPARC64, a 64-bit processor that uses all 64-bits
of virtual addresses.  The idea is to use the low order 3 bits
to at least get a small ABA counter.  That should work since
pointers are aligned.  The idea is for SPARC64 to set CNT_MASK
== 7, PTR_BITS == 0, PTR_MASK == 0xffffffffffffff8.

Also add uintptr casts to avoid GCC warnings.  The gccgo
runtime code is compiled with GCC, and GCC warns when casting
between a pointer and a type of a different size.

R=dvyukov
CC=golang-dev
https://codereview.appspot.com/7225043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b