Registers a callback that will be invoked when the last bps_shutdown() Frees platform service resources for the current thread specified by the caller. function is called.
BPS_API int bps_register_shutdown_handler(void(*shutdown_handler)(void *), void *data)
- The function for platform services to call when the library is shutting down. BPS passes the data that the caller provided as the first argument.
- The user data that is passed as the first argument when the BPS calls the shutdown handler.
This function cleans up a service's global data. Typically, a service has to reset the domain ID to indicate it has been uninitialized. Other cleanup activities depend on the service's implementation.
BPS_SUCCESS is returned if the handler registered successfully with the data, BPS_FAILURE with the errno value set otherwise.