Handle platforms that don't support __thread.
Summary: - Apple platforms either have different __thread behavior than Linux: on i386 __thread values are zeroed out before the destructor provided to pthread_key_create(3) is called; on ARM, __thread isn't supported at all. To handle this, use pthread_getspecific(3) to manage the array of IDs on these platforms only. Test Plan: - fbconfig -r folly && fbmake runtests - ./configure && make check on Ubuntu/FC/Mac Reviewed By: simpkins@fb.com FB internal diff: D1008923
Showing
Please register or sign in to comment