-#if defined(GC_SOLARIS_THREADS) && !defined(GC_SOLARIS_PTHREADS)
-main()
-{
- thread_t th1;
- thread_t th2;
- int code;
-
- n_tests = 0;
- GC_INIT(); /* Only needed if gc is dynamic library. */
-# ifndef MAKE_BACK_GRAPH
- GC_enable_incremental();
-# endif
- (void) GC_set_warn_proc(warn_proc);
- if (thr_keycreate(&fl_key, GC_free) != 0) {
- (void)GC_printf1("Key creation failed %lu\n", (unsigned long)code);
- FAIL;
- }
- if ((code = thr_create(0, 1024*1024, thr_run_one_test, 0, 0, &th1)) != 0) {
- (void)GC_printf1("Thread 1 creation failed %lu\n", (unsigned long)code);
- FAIL;
- }
- if ((code = thr_create(0, 1024*1024, thr_run_one_test, 0, THR_NEW_LWP, &th2)) != 0) {
- (void)GC_printf1("Thread 2 creation failed %lu\n", (unsigned long)code);
- FAIL;
- }
- run_one_test();
- if ((code = thr_join(th1, 0, 0)) != 0) {
- (void)GC_printf1("Thread 1 failed %lu\n", (unsigned long)code);
- FAIL;
- }
- if (thr_join(th2, 0, 0) != 0) {
- (void)GC_printf1("Thread 2 failed %lu\n", (unsigned long)code);
- FAIL;
- }
- check_heap_stats();
- (void)fflush(stdout);
- return(0);
-}
-#else /* pthreads */
-
-#ifndef GC_PTHREADS
- --> bad news
-#endif
-
-main()