]>
git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/thread-local-cleanup.dtest/main.c
2 // BUILD: $CC foo.c -dynamiclib -install_name $RUN_DIR/libtlv.dylib -o $BUILD_DIR/libtlv.dylib
3 // BUILD: $CC main.c -DRUN_DIR="$RUN_DIR" -o $BUILD_DIR/thread-local-cleanup.exe
5 // RUN: ./thread-local-cleanup.exe
16 printf("[BEGIN] thread-local-cleanup\n");
18 for (int i
=0; i
< 1000; ++i
) {
19 void* handle
= dlopen(RUN_DIR
"/libtlv.dylib", RTLD_FIRST
);
20 if ( handle
== NULL
) {
21 printf("[FAIL] thread-local-cleanup: iteration %d %s\n", i
, dlerror());
25 int result
= dlclose(handle
);
27 printf("[FAIL] thread-local-cleanup: iteration %d %s\n", i
, dlerror());
32 printf("[PASS] thread-local-cleanup\n");