/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*/
/* A Solaris implementation of the Itanium C++ ABI __cxa_atexit
* and __cxa_finalize functions.
*/
#include <stdlib.h>
#include <pthread.h>
#include "cxa_finalize.h"
#define __CXA_FUNC_CALLBACK 0
#ifdef __cplusplus
extern "C" {
#endif
typedef struct __cxxabi_atexit {
void (*cxa_func)(void*);
void* arg;
void* dso;
typedef struct __cxxabi_atexit_list {
extern void* __dso_handle;
void __cxa_atexit_callback(void);
return -1;
return 0;
}
return -1;
return 0;
}
int ret = 0;
return -1;
if (_initialized == 0) {
if (ret == -1) {
return ret;
}
_initialized = 1;
}
if (ret == -1) {
return ret;
}
}
if (_registered == 0) {
_registered = (ret == 0);
}
if (_registered != 1) {
return ret;
}
return ret;
}
void __cxa_atexit_callback(void) {
return;
/* destroy local scope objects first */
}
--__p;
}
/* destroy global scope objects last */
}
--__p;
}
}
/* get dso_type from dso object itself */
/* get dso scope from dso object */
return __register_with_atexit(&cxa);
}
uint32_t i;
if (_initialized == 0) {
return -1;
}
return -1;
--__p;
continue;
}
if (__type == __CXA_FUNC_CALLBACK)
--__p;
}
} else {
i = 0;
do {
if (__type == __CXA_FUNC_CALLBACK)
}
++__p; ++i;
}
return 0;
}
}
#ifdef __cplusplus
}
#endif