Use membarrier in TLRefCount
authorAndrii Grynenko <andrii@fb.com>
Tue, 19 Jul 2016 01:17:06 +0000 (18:17 -0700)
committerFacebook Github Bot 5 <facebook-github-bot-5-bot@fb.com>
Tue, 19 Jul 2016 01:23:30 +0000 (18:23 -0700)
commit3f0064f677cddc5d9c56f3beb2ef3010732e8d6f
treed2bf7068cbbd4346307fe7962ab52137c0fc34a8
parentcf21fddda97b2bd137154213e1b49e02d9576788
Use membarrier in TLRefCount

Summary: membarrier guarantees that there's at most one update to thread-local counter, which collecting thread may not see.

Reviewed By: djwatson

Differential Revision: D3532952

fbshipit-source-id: 6106bfe87c70c5f864573a424662778e20423bbb
folly/Makefile.am
folly/Portability.h
folly/experimental/AsymmetricMemoryBarrier.cpp [new file with mode: 0644]
folly/experimental/AsymmetricMemoryBarrier.h [new file with mode: 0644]
folly/experimental/TLRefCount.h
folly/portability/SysMembarrier.cpp [new file with mode: 0644]
folly/portability/SysMembarrier.h [new file with mode: 0644]