Add MicroLock as an alternative to MicroSpinLock
authorDaniel Colascione <dancol@fb.com>
Fri, 4 Mar 2016 00:33:07 +0000 (16:33 -0800)
committerFacebook Github Bot 8 <facebook-github-bot-8-bot@fb.com>
Fri, 4 Mar 2016 00:35:20 +0000 (16:35 -0800)
commited14d607d70bc342818ea2f6875316654dbc1002
tree072e693fd17ebc8cb9e875e77c01ecffef91ee8a
parenta1b77701d8619afc907ba0408d03aadecf852e02
Add MicroLock as an alternative to MicroSpinLock

Summary:MicroLock is a full-featured lock that fills the niche that
MicroSpinLock and PicoSpinLock currently inhabit.  Unlike these two
classes, MicroLock is a sleeping lock.  MicroLock requires two bits of
a single word and has no particular alignment requirements.

Reviewed By: ot

Differential Revision: D3004474

fb-gh-sync-id: a9bd28bd3f48e894d5bff407612ee4b228466209
shipit-source-id: a9bd28bd3f48e894d5bff407612ee4b228466209
folly/Makefile.am
folly/MicroLock.cpp [new file with mode: 0644]
folly/MicroLock.h [new file with mode: 0644]
folly/MicroSpinLock.h
folly/PicoSpinLock.h
folly/SmallLocks.h
folly/test/SmallLocksBenchmark.cpp [new file with mode: 0644]
folly/test/SmallLocksTest.cpp