public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: cagney@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM]  master: Enable jni testing of frysk.rsl.
Date: Wed, 30 Apr 2008 20:57:00 -0000	[thread overview]
Message-ID: <20080430205752.16875.qmail@sourceware.org> (raw)

The branch, master has been updated
       via  56ff5da9054640e37a187ff37871dc6d02058a0d (commit)
      from  784366432a48d3f5e5072dee4c456d4dbb569c9c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 56ff5da9054640e37a187ff37871dc6d02058a0d
Author: Andrew Cagney <cagney@redhat.com>
Date:   Wed Apr 30 16:55:46 2008 -0400

    Enable jni testing of frysk.rsl.
    
    frysk-sys/ChangeLog
    2008-04-30  Andrew Cagney  <cagney@redhat.com>
    
    	* Makefile.am (JniRunner): Enable frysk.rsl.
    
    frysk-sys/frysk/sys/ChangeLog
    2008-04-30  Andrew Cagney  <cagney@redhat.com>
    
    	* jni/Tid.cxx (Tid::tid): Implement.
    	* jni/Pid.cxx (Pid::parentPid, Pid::pid): Implement.

-----------------------------------------------------------------------

Summary of changes:
 frysk-sys/ChangeLog             |    5 ++++-
 frysk-sys/Makefile.am           |    1 +
 frysk-sys/frysk/sys/ChangeLog   |    5 +++++
 frysk-sys/frysk/sys/jni/Pid.cxx |   29 ++++++++++++-----------------
 frysk-sys/frysk/sys/jni/Tid.cxx |   19 ++++++++++---------
 5 files changed, 32 insertions(+), 27 deletions(-)

First 500 lines of diff:
diff --git a/frysk-sys/ChangeLog b/frysk-sys/ChangeLog
index aef4b07..8ab756e 100644
--- a/frysk-sys/ChangeLog
+++ b/frysk-sys/ChangeLog
@@ -1,6 +1,9 @@
 2008-04-30  Andrew Cagney  <cagney@redhat.com>
 
-	* Makefile.am (JniRunner): Provide default tests to run.
+	* Makefile.am (JniRunner): Enable frysk.rsl.
+
+	* Makefile.am (JniRunner): Provide default tests to run - start
+	with lib.stdcpp.
 
 2008-04-17  Andrew Cagney  <cagney@redhat.com>
 
diff --git a/frysk-sys/Makefile.am b/frysk-sys/Makefile.am
index 38325a2..94e6aa3 100644
--- a/frysk-sys/Makefile.am
+++ b/frysk-sys/Makefile.am
@@ -89,6 +89,7 @@ JniRunner: | frysk-sys.jar libfrysk-sys-jni.so
 	echo "if test \$$# -eq 0 ; then"			>> $@.tmp
 	echo "  $(JAVA) JniRunner \\"				>> $@.tmp
 	echo "    lib.stdcpp \\"				>> $@.tmp
+	echo "    frysk.rsl \\"					>> $@.tmp
 	echo "    ;"						>> $@.tmp
 	echo "else"						>> $@.tmp
 	echo "  $(JAVA) JniRunner \"\$$@\""			>> $@.tmp
diff --git a/frysk-sys/frysk/sys/ChangeLog b/frysk-sys/frysk/sys/ChangeLog
index 685ed19..5f27325 100644
--- a/frysk-sys/frysk/sys/ChangeLog
+++ b/frysk-sys/frysk/sys/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-30  Andrew Cagney  <cagney@redhat.com>
+
+	* jni/Tid.cxx (Tid::tid): Implement.
+	* jni/Pid.cxx (Pid::parentPid, Pid::pid): Implement.
+
 2008-04-17  Andrew Cagney  <cagney@redhat.com>
 
 	* jni/Signal.cxx-sh: Replace ...
diff --git a/frysk-sys/frysk/sys/jni/Pid.cxx b/frysk-sys/frysk/sys/jni/Pid.cxx
index 022ae42..09b3e8c 100644
--- a/frysk-sys/frysk/sys/jni/Pid.cxx
+++ b/frysk-sys/frysk/sys/jni/Pid.cxx
@@ -37,25 +37,20 @@
 // version and license this file solely under the GPL without
 // exception.
 
-#include "frysk_sys_Pid.h"
+#include <sys/types.h>
+#include <unistd.h>
 
+#include <jni.h>
 
-JNIEXPORT jint
-Java_frysk_sys_Pid_pid (JNIEnv *env, jclass)
-{
-  jclass cls = env->FindClass("java/lang/RuntimeException");
-  if (cls != NULL) {
-    env->ThrowNew(cls, __FILE__ ":Java_frysk_sys_Pid_pid not implemented");
-  }
-  return 0;
+#include "frysk/sys/Pid-jni.hxx"
+
+
+jint
+frysk::sys::Pid::pid(JNIEnv *env, jclass) {
+  return ::getpid();
 }
 
-JNIEXPORT jint
-Java_frysk_sys_Pid_parentPid (JNIEnv *env, jclass)
-{
-  jclass cls = env->FindClass("java/lang/RuntimeException");
-  if (cls != NULL) {
-    env->ThrowNew(cls, __FILE__ ":Java_frysk_sys_Pid_parentPid not implemented");
-  }
-  return 0;
+jint
+frysk::sys::Pid::parentPid(JNIEnv *env, jclass) {
+  return ::getppid();
 }
diff --git a/frysk-sys/frysk/sys/jni/Tid.cxx b/frysk-sys/frysk/sys/jni/Tid.cxx
index 02c945a..5b83c10 100644
--- a/frysk-sys/frysk/sys/jni/Tid.cxx
+++ b/frysk-sys/frysk/sys/jni/Tid.cxx
@@ -37,15 +37,16 @@
 // version and license this file solely under the GPL without
 // exception.
 
-#include "frysk_sys_Tid.h"
+#include <sys/types.h>
+#include <unistd.h>
+#include <linux.syscall.h>
+#include <sys/syscall.h>
 
+#include <jni.h>
 
-JNIEXPORT jint
-Java_frysk_sys_Tid_tid (JNIEnv *env, jclass)
-{
-  jclass cls = env->FindClass("java/lang/RuntimeException");
-  if (cls != NULL) {
-    env->ThrowNew(cls, __FILE__ ":Java_frysk_sys_Tid_tid not implemented");
-  }
-  return 0;
+#include "frysk/sys/Tid-jni.hxx"
+
+jint
+frysk::sys::Tid::tid(JNIEnv *env, jclass) {
+  return ::syscall(SYS_gettid);
 }


hooks/post-receive
--
frysk system monitor/debugger


                 reply	other threads:[~2008-04-30 20:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080430205752.16875.qmail@sourceware.org \
    --to=cagney@sourceware.org \
    --cc=frysk-cvs@sourceware.org \
    --cc=frysk@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).