mthr_halt - call the shutdown handler and terminate the application
void mthr_halt(int exitvalue);
Although it's possible to terminate the multithreaded application by a call to exit(3), it may be advantageous to terminate the application with a call to the shutdown handler which can be set by mthr_set_shutdownhandler. mthr_halt() will terminate the application by calling the shutdown handler and exiting the application with the value given by exitvalue. This function is also internally called by the thread package when the last userlevel thread terminates.