Use __thread for thread local variable.