Speed up EventCount, now 64-bit only
authorTudor Bosman <tudorb@fb.com>
Fri, 21 Jun 2013 03:14:35 +0000 (20:14 -0700)
committerJordan DeLong <jdelong@fb.com>
Wed, 26 Jun 2013 02:47:03 +0000 (19:47 -0700)
commit8949d553667b268698258fa41759bc655568d91b
tree931fd5660ddf151aa64a722728e44347fc57f955
parenta664fa91fed10a492ec4560f3e97a4e1b8c7e59d
Speed up EventCount, now 64-bit only

Summary:
Don't use two atomic variables when only one will suffice (otherwise, the
increments in doNotify() and prepareWait() would require memory_model_seq_cst,
because they need to globally order a store before a load, and no weaker
model allows you to do that)

Of course, this makes this 64-bit only, but I don't care.

Test Plan: eventcount_test, tests outside of folly

Reviewed By: delong.j@fb.com

FB internal diff: D858963
folly/experimental/EventCount.h