Fix destruction order
authorMaged Michael <magedmichael@fb.com>
Wed, 16 Aug 2017 01:01:19 +0000 (18:01 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 16 Aug 2017 01:11:34 +0000 (18:11 -0700)
commit520148aaf14ab535b386c045e836af47645436ff
treea5c1022e628d69a5a8a55cd4e79d4c69ab959514
parentcccde53ecdbfd7b9b328775eb3c814f95b1bb93a
Fix destruction order

Summary:
- Added `hazptr.cpp` and `memory_resource.cpp`. Moved singleton code to source.
  - Changed the singleton for the default `hazptr_domain` to a global.
  - Changed hazptr_stats singleton to a global.
  - Moved the thread caching calls from the hazptr_domain functions to the constructor/destructor of hazptr_holder.
  - Changed the TLS singletons to TLS globals.
  - Changed some inlining directives.
  - Leak the hazptr_rec-s in the default domain

Reviewed By: davidtgoldblatt, djwatson

Differential Revision: D5553753

fbshipit-source-id: da69eecec55c0f78fb8ef5591f9aeffee99ff3fa
folly/experimental/hazptr/bench/HazptrBench.h
folly/experimental/hazptr/example/SWMRList.h
folly/experimental/hazptr/hazptr-impl.h
folly/experimental/hazptr/hazptr.cpp [new file with mode: 0644]
folly/experimental/hazptr/hazptr.h
folly/experimental/hazptr/memory_resource.cpp [new file with mode: 0644]
folly/experimental/hazptr/memory_resource.h
folly/experimental/hazptr/test/HazptrTest.cpp