schedule: set thread to NULL when there is no next thread
-rw-r--r-- 72 .gitignore
-rw-r--r-- 206 Makefile
-rw-r--r-- 2692 libthreads.c
-rw-r--r-- 591 libthreads.h
-rw-r--r-- 946 schedule.c
-rw-r--r-- 190 schedule.h