2016-01-14 02:02:56 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Wind River Systems, Inc.
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-01-14 02:02:56 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @file
|
|
|
|
* @brief Basic C++ destructor module for globals for ARM
|
|
|
|
*/
|
|
|
|
|
2022-05-06 16:49:15 +08:00
|
|
|
#include <zephyr/toolchain.h>
|
2016-01-14 02:02:56 +08:00
|
|
|
|
|
|
|
EXTERN_C int __cxa_atexit(void (*destructor)(void *), void *objptr, void *dso);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Register destructor for a global object
|
|
|
|
*
|
|
|
|
* @param objptr global object pointer
|
|
|
|
* @param destructor the global object destructor function
|
|
|
|
* @param dso Dynamic Shared Object handle for shared libraries
|
|
|
|
*
|
|
|
|
* Wrapper for __cxa_atexit()
|
|
|
|
*/
|
|
|
|
int __aeabi_atexit(void *objptr, void (*destructor)(void *), void *dso)
|
|
|
|
{
|
|
|
|
return __cxa_atexit(destructor, objptr, dso);
|
|
|
|
}
|