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

Issue 1020043: code review 1020043: The comments in dfa indicate that at some point read me... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 11 months ago by Stefano Rivera
Modified:
14 years, 11 months ago
Reviewers:
CC:
rsc, re2-dev_googlegroups.com
Visibility:
Public.

Description

The comments in dfa indicate that at some point read memory barriers would be added, as require for lax memory systems such as Alpha. Here is a patch that adds memory barrier support on Alpha (although not tested on an alpha). This patch is used in Debian's re2, as we replace atomicops.h code with inlined memory barrier functions provided by libatomic-ops. Thus we don't need to support every architecture in RE2, but we do need read memory barriers in the lock-free search code.

Patch Set 1 #

Patch Set 2 : code review 1020043: The comments in dfa indicate that at some point read me... #

Patch Set 3 : code review 1020043: The comments in dfa indicate that at some point read me... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -14 lines) Patch
M re2/dfa.cc View 1 2 4 chunks +4 lines, -3 lines 0 comments Download
M util/atomicops.h View 1 2 3 chunks +31 lines, -11 lines 0 comments Download

Messages

Total messages: 6
Stefano Rivera
Hello rsc (cc: re2-dev@googlegroups.com), I'd like you to review this change.
14 years, 11 months ago (2010-04-30 13:00:52 UTC) #1
rsc1
Thanks for adding this. Can we call the read barrier MaybeReadMemoryBarrier() instead of ReadMemoryBarrierDepends()? The ...
14 years, 11 months ago (2010-04-30 16:09:07 UTC) #2
stefano_rivera.za.net
Hi rsc (2010.04.30_18:09:07_+0200) > Can we call the read barrier > MaybeReadMemoryBarrier() Sure. Depends came ...
14 years, 11 months ago (2010-04-30 18:06:28 UTC) #3
Stefano Rivera
Hello rsc (cc: re2-dev@googlegroups.com), Please take another look.
14 years, 11 months ago (2010-04-30 18:10:38 UTC) #4
rsc1
LGTM Thanks
14 years, 11 months ago (2010-04-30 18:48:01 UTC) #5
rsc
14 years, 11 months ago (2010-04-30 19:49:04 UTC) #6
*** Submitted as http://code.google.com/p/re2/source/detail?r=7f0b91b267fe ***

The comments in dfa indicate that at some point read memory barriers would
be added, as require for lax memory systems such as Alpha.
Here is a patch that adds memory barrier support on Alpha (although not
tested on an alpha).

This patch is used in Debian's re2, as we replace atomicops.h code with
inlined memory barrier functions provided by libatomic-ops. Thus we don't
need to support every architecture in RE2, but we do need read memory
barriers in the lock-free search code.

R=rsc
CC=re2-dev
http://codereview.appspot.com/1020043

Committer: Russ Cox <rsc@swtch.com>
Sign in to reply to this message.

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