Update thread.c