thr_exit(3THR) はスレッドを終了させます (POSIX スレッドについては、pthread_exit(3THR)を参照)。
#include <thread.h> void thr_exit(void *status);