Refine atomic operations for Linux/ARM.

This patch comes from recent discussions from the following
review link:

  https://chromiumcodereview.appspot.com/16109010/

In a nutshell:

- Using the "cmp" instruction, instead of "teq" is
  better for recent ARM CPUs.

- Fix a tiny typo.

- Fix the ARMv5 implementation of Release_CompareAndSwap()
  since the old one could return without performing any
  memory barrier when prev_value != old_value.

  It's not clear whether the old behaviour is desirable
  because client code could naively assume the function
  always perform a release operation, even in case of
  failure.

BUG=234215

Review URL: https://chromiumcodereview.appspot.com/18984012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211013 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 8ceb4b90f1a33141c5d8322d5771f280a5d18db3
1 file changed
tree: 5a1972af9e048bec8ab0efc963c985d78db647ab
  1. base/
  2. build/
  3. dbus/
  4. ipc/
  5. testing/
  6. third_party/