restyle thread.c