use gettid instead of __sm_thread_id