Use thr_exit(3T) to terminate a thread. (For POSIX threads, see "pthread_exit(3T)".)
#include <thread.h> void thr_exit(void *status);