1 // Test JVMTI GetAllThreads
3 import java
.util
.ArrayList
;
5 public class getallthreads
extends Thread
7 public static int thread_num
;
8 public static ArrayList threads
;
11 public boolean done
= false;
13 public static native void do_getallthreads_tests ();
17 ex_frames
= thread_num
;
22 if ((ex_frames
% 2) == 0)
31 public native void natPlaceholder ();
32 public native void natRunner ();
34 public void placeholder ()
40 if ((thread_num
% 2) == 0)
56 public static void main (String
[] args
)
58 System
.out
.println ("JVMTI GetAllThreads tests");
59 threads
= new ArrayList (20);
63 for (int i
= 0; i
< 20; i
++)
65 t
= new getallthreads ();
72 do_getallthreads_tests ();
74 for (int i
= 0; i
< 20; i
++)
76 t
= (getallthreads
) threads
.get(i
);