8 #include "getallthreads.h"
11 getallthreads::natPlaceholder ()
17 if ((getallthreads::thread_num
% 2) == 0)
27 getallthreads::natRunner ()
35 getallthreads::do_getallthreads_tests ()
38 JavaVM
*vm
= _Jv_GetJavaVM ();
39 vm
->GetEnv (reinterpret_cast<void **> (&env
), JVMTI_VERSION_1_0
);
44 jvmtiError jerr
= env
->GetAllThreads (&num_threads
, &thread_arr
);
45 if (jerr
!= JVMTI_ERROR_NONE
)
47 printf ("Test Failed, JVMTI Error!\n");
50 env
->Deallocate (reinterpret_cast<unsigned char *> (thread_arr
));
52 for (int i
= 0; i
< num_threads
; i
++)
53 printf ("Found thread %d\n", i
+1 );