Added macros for thread locals
Merge branch 'tmp'

* tmp:
  Added macros for thread locals