make use of gettid syscall for thread-id printing