rename io::PortableSpinLock to SpinLock
authorAdam Simpkins <simpkins@fb.com>
Thu, 11 Dec 2014 20:23:34 +0000 (12:23 -0800)
committerJoelMarcey <joelm@fb.com>
Thu, 18 Dec 2014 20:29:40 +0000 (12:29 -0800)
commit4494e275ffe1c2bd4a4e59550c325fccbafed139
tree9efb4ff58638698fad32d8b7af7b8ae3fa1b2287
parent249e3805dfa2cc2f2026a6c42541d75a98510b5b
rename io::PortableSpinLock to SpinLock

Summary:
folly::io::PortableSpinLock seems generally useful outside of the io
code.  This moves it into the base folly namespace, and renames it from
PortableSpinLock to just SpinLock.

For most users, the main difference between MicroSpinLock and SpinLock
is that SpinLock provides a constructor that does the right thing, while
MicroSpinLock has to be explicitly initialized.

Test Plan:
Added some new unit tests, and tested both the MicroSpinLock and
pthread_spinlock_t implementations.  I didn't test the Mac OS version,
although that code remains unchanged.

Reviewed By: seanc@fb.com

Subscribers: trunkagent, doug, net-systems@, exa, folly-diffs@

FB internal diff: D1734632

Signature: t1:1734632:1418394033:99f6fbe73b485a1d631a2ef7d1b39ea6f49ecb0b
folly/Makefile.am
folly/SmallLocks.h
folly/SpinLock.h [new file with mode: 0644]
folly/io/PortableSpinLock.h
folly/test/Makefile.am
folly/test/SpinLockTest.cpp [new file with mode: 0644]