projects
/
nestedvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make Runtime._syscall() protected so it can be overridden from outside the package
[nestedvm.git]
/
src
/
tests
/
CallTest.java
diff --git
a/src/tests/CallTest.java
b/src/tests/CallTest.java
index
77fd217
..
1d57bce
100644
(file)
--- a/
src/tests/CallTest.java
+++ b/
src/tests/CallTest.java
@@
-1,3
+1,7
@@
+// Copyright 2000-2005 the Contributors, as shown in the revision logs.
+// Licensed under the Apache License 2.0 ("the License").
+// You may not use this file except in compliance with the License.
+
package tests;
import org.ibex.nestedvm.Runtime;
package tests;
import org.ibex.nestedvm.Runtime;
@@
-26,7
+30,7
@@
public class CallTest {
case 1: return rt.strdup("OS: " + System.getProperty("os.name"));
case 2: return rt.strdup(System.getProperty("os.version"));
case 3: return rt.strdup(new Date().toString());
case 1: return rt.strdup("OS: " + System.getProperty("os.name"));
case 2: return rt.strdup(System.getProperty("os.version"));
case 3: return rt.strdup(new Date().toString());
- case 4: return rt.addFD(new Runtime.OutputStreamFD(new CustomOS()));
+ case 4: return rt.addFD(new Runtime.InputOutputStreamFD(null,new CustomOS()));
case 5:
System.out.println("In callJava() in Java");
try { rt.call("backinmips"); } catch(Runtime.CallException e) { }
case 5:
System.out.println("In callJava() in Java");
try { rt.call("backinmips"); } catch(Runtime.CallException e) { }
@@
-43,12
+47,13
@@
public class CallTest {
System.out.println("== Start of CallTest ==");
System.out.println("Back in java... calling callme()");
System.out.println("== Start of CallTest ==");
System.out.println("Back in java... calling callme()");
- int ret = rt.call("callme",a1,a2,a3,a4,a5,a6);
+ int ret = rt.call("callme",new int[]{a1,a2,a3,a4,a5,a6});
System.out.println("callme returned: " + ret);
int addr = rt.strdup("Hello, World from java");
rt.call("echo",addr,4);
rt.free(addr);
System.out.println("callme returned: " + ret);
int addr = rt.strdup("Hello, World from java");
rt.call("echo",addr,4);
rt.free(addr);
+ rt.call("echo",new Object[]{"Hello, World, from the Object[] call method",new Integer(2)});
System.out.println("== End of CallTest ==");
rt.execute();
System.out.println("== End of CallTest ==");
rt.execute();