shutdown_handler_t mthr_set_shutdownhandler(shutdown_handler_t new_handler);
The default shutdown handler mthr_default_shutdown() does nothing but terminate the application.
The handler mthr_profile_shutdown() prints some useful profiling information like the number of scheduling decisions, the number of thread migrations etc. for each of the used processors. This information can give hints how to improve an application's performance by tuning the package's configuration parameters.
To install an own shutdown handler, the user must offer a function of the following type:
void (*shutdown_handler_t)(int exitvalue)
mthr_set_shutdownhandler will install new_handler as the new shutdown handler and return a reference to the old one. If new_handler is a null pointer, only the old handler will be returned, but no new handler will be installed.