bps_register_shutdown_handler()

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.

Synopsis:

#include <bps/bps.h>
 
BPS_API int bps_register_shutdown_handler(void(*shutdown_handler)(void *), void *data)

Arguments:

shutdown_handler
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.
data
The user data that is passed as the first argument when the BPS calls the shutdown handler.

Library:

libbps

Description:

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.

Returns:

BPS_SUCCESS is returned if the handler registered successfully with the data, BPS_FAILURE with the errno value set otherwise.