facebook/hhvm — pull request #3120 by tstarling (2014-07-07 03:03:26+00:00)
Title: Fix EZC usage of ThreadLocal and clarify ThreadLocal comments

I inappropriately had EZC's TSRM layer create ThreadLocal objects as
true globals, instead of using DECLARE_THREAD_LOCAL and
IMPLEMENT_THREAD_LOCAL. This caused a crash since the variables were
meant to be thread-local but weren't. Fixed this, and clarified and
expanded the comments in thread-local.h to address the origin of the
error.

Also:

* Fixed some whitespace and namespacing issues in this code, along
the lines of my previous EZC commits.
* Fixed a bounds check in ts_free_id().