Files
android_development/ndk/tests/dlclose-destruction/jni/libtest1.h
David 'Digit' Turner d155de2400 Update API level 9 sysroot to allow static C++ destructors to be called on dlclose().
This introduces crtbegin_so.o and crtend_so.o and also requires a corresponding
change in the NDK build scripts to use them.

Also add a small test under 'tests/dlclose-destruction' to check that.
Note that this is not a sample (i.e. Android application) per se.

Change-Id: Icf25836363a3ed59310e579ce990aeca868e70e4
2010-06-25 16:17:58 -07:00

22 lines
426 B
C

#ifndef LIBTEST1_H
#define LIBTEST1_H
#ifdef __cplusplus
extern "C" {
#endif
/* define in libtest1, will be called dynamically through dlsym()
* by main.c. This function receives the address of an integer
* and sets its value to 1.
*
* when the library is unloaded, the value is set to 2 automatically
* by the destructor there.
*/
extern void test1_set(int *px);
#ifdef __cplusplus
}
#endif
#endif /* LIBTEST1_H */