fix PicoSpinLock for aarch64 and allow PackedSyncPtr to compile for aarch64
authorStephen Chen <tracelog@fb.com>
Sat, 20 May 2017 03:59:15 +0000 (20:59 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 20 May 2017 04:06:38 +0000 (21:06 -0700)
commit7e04d47528f4ac428741ec41efdc500fb515e4ac
tree5a7390a66c0156b85c187e4d33baac4e0ac1e9e5
parentb3e7df8220f410398011fea71b280ba8be459fcc
fix PicoSpinLock for aarch64 and allow PackedSyncPtr to compile for aarch64

Summary:
Looks like we never tried to compile or run the PicoSpinLock under aarch64. There were two problems:

if sizeof(IntType) is 64, we try to do
  1 << 63
in lock and unlock. This doesn't compile because sizeof(1) is 32.

Also for try_lock, we were returning the data instead of checking for the locked bit.

Reviewed By: djwatson, yfeldblum

Differential Revision: D5091656

fbshipit-source-id: 4f81b8b32633e87b491548a1a24b9bcf20264063
folly/PackedSyncPtr.h
folly/PicoSpinLock.h