Add very basic compatibility with folly locks for synchronized
authorCaren Thomas <carenthomas@fb.com>
Fri, 17 Jun 2016 18:24:54 +0000 (11:24 -0700)
committerFacebook Github Bot 5 <facebook-github-bot-5-bot@fb.com>
Fri, 17 Jun 2016 18:38:24 +0000 (11:38 -0700)
commit3c4a013ff85c5ff329c7270094f31881629b3581
treebe2ad6dc939bf565342e3f9438243dc39f5262e9
parentcc5485f8934b5a6024a80ac2cea147aa7816c0c8
Add very basic compatibility with folly locks for synchronized

Summary: Add folly locks to the HasLockUnlock struct so that they can be used inside Synchronized. acquireReadWrite() and releaseReadWrite() functions are added to each lock class so that their .lock and .unlock methods are accessible by Synchronized. These changes allow an extremely basic level of compatibility for the purpose of running benchmarks and so compatibility with dual_locking, etc. have not been tested.

Reviewed By: simpkins

Differential Revision: D3434621

fbshipit-source-id: d55cffbb1eccaf23645384b9a41f85c5df593ffe
folly/SpinLock.h
folly/test/SynchronizedTest.cpp