OSDN Git Service

lejos_NXJ_win32_0_6_0beta.zip
[nxt-jsp/lejos_nxj.git] / nxtOSEK / lejos_nxj / src / java / classes / lejos / nxt / debug / DebugThread.java
diff --git a/nxtOSEK/lejos_nxj/src/java/classes/lejos/nxt/debug/DebugThread.java b/nxtOSEK/lejos_nxj/src/java/classes/lejos/nxt/debug/DebugThread.java
new file mode 100644 (file)
index 0000000..ae0cb38
--- /dev/null
@@ -0,0 +1,30 @@
+package lejos.nxt.debug;\r
+\r
+import java.util.*;\r
+import lejos.nxt.*;\r
+/**\r
+ * Provides a Java view of the VM thread structure.\r
+ * @author andy\r
+ */\r
+public class DebugThread\r
+{\r
+    // NOTE This is very very iffy. This class does not really "exist"\r
+    // The real class type is thread. However to make the private contents\r
+    // availabe without having to change the thread class or add things to\r
+    // java.lang, we cheat. Basically the firmware hands us a thread ref.\r
+    // we pretend it is a DebugThread... Things seem to work. Do not add\r
+    // methods or anything else to this class unless you really know what\r
+    // you are doing!\r
+    public DebugThread nextThread;\r
+    public Object waitingOn;\r
+    public int sleepUntil;\r
+    public int[] stackFrameArray;\r
+    public int[] stackArray;\r
+    public byte stackFrameArraySize;\r
+    public byte monitorCount;\r
+    public byte threadId;\r
+    public byte state;\r
+    public byte priority;\r
+    public byte interrupted;\r
+    public byte daemon;\r
+}\r