summaryrefslogtreecommitdiffstats
path: root/libjava/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/gnu')
-rw-r--r--libjava/gnu/gcj/jni/NativeThread.java28
-rw-r--r--libjava/gnu/gcj/jni/natNativeThread.cc24
2 files changed, 52 insertions, 0 deletions
diff --git a/libjava/gnu/gcj/jni/NativeThread.java b/libjava/gnu/gcj/jni/NativeThread.java
new file mode 100644
index 00000000000..9ed6d89cfac
--- /dev/null
+++ b/libjava/gnu/gcj/jni/NativeThread.java
@@ -0,0 +1,28 @@
+// NativeThread.java - Wrapper for attached user threads.
+
+/* Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package gnu.gcj.jni;
+
+/**
+ * @author Tom Tromey <tromey@cygnus.com>
+ * @date February 9, 2000
+ */
+
+public class NativeThread extends Thread
+{
+ public NativeThread (ThreadGroup g, String name)
+ {
+ super (g, null, name);
+ alive_flag = true;
+ }
+
+ // Call this to mark the thread as finished.
+ public native void finish ();
+}
diff --git a/libjava/gnu/gcj/jni/natNativeThread.cc b/libjava/gnu/gcj/jni/natNativeThread.cc
new file mode 100644
index 00000000000..b26c95dba94
--- /dev/null
+++ b/libjava/gnu/gcj/jni/natNativeThread.cc
@@ -0,0 +1,24 @@
+// natNativeThread.cc - Native side of attached threads.
+
+/* Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+// Written by Tom Tromey <tromey@cygnus.com>
+
+#include <config.h>
+
+#include <gcj/cni.h>
+#include <jvm.h>
+#include <gnu/gcj/jni/NativeThread.h>
+#include <java/lang/Thread.h>
+
+void
+gnu::gcj::jni::NativeThread::finish ()
+{
+ finish_ ();
+}
OpenPOWER on IntegriCloud