Initialize next_tid in thread.c