Update threads.c

Most up to date.