PipeImpl.java: Use VMPipe for native stuff.

2004-09-24  Michael Koch  <konqueror@gmx.de>

	* gnu/java/nio/PipeImpl.java: Use VMPipe for native stuff.
	* gnu/java/nio/SelectorImpl.java: Use VMSelector for native stuff.
	* gnu/java/nio/VMPipe.java,
	gnu/java/nio/VMSelector.java:
	New files.
	* gnu/java/nio/natPipeImplEcos.cc,
	gnu/java/nio/natPipeImplPosix.cc,
	gnu/java/nio/natPipeImplWin32.cc:
	Ported to VMPipe.
	* gnu/java/nio/natSelectorImplEcos.cc,
	gnu/java/nio/natSelectorImplPosix.cc,
	gnu/java/nio/natSelectorImplWin32.cc:
	Ported to VMSelector.
	* Makefile.am: Added new files gnu/java/nio/VMPipe.java and
	gnu/java/nio/VMSelector.java.
	* Makefile.in: Regenerated.

From-SVN: r88014
This commit is contained in:
Michael Koch
2004-09-24 06:41:57 +00:00
committed by Michael Koch
parent 5d865dace2
commit 9e54846fac
13 changed files with 184 additions and 36 deletions
+1 -14
View File
@@ -53,14 +53,6 @@ import gnu.classpath.Configuration;
public class SelectorImpl extends AbstractSelector
{
static
{
// load the shared library needed for native methods.
if (Configuration.INIT_LOAD_LIBRARY)
{
System.loadLibrary ("javanio");
}
}
private Set keys;
private Set selected;
@@ -140,11 +132,6 @@ public class SelectorImpl extends AbstractSelector
return select (0);
}
// A timeout value of 0 means block forever.
private static native int implSelect (int[] read, int[] write,
int[] except, long timeout)
throws IOException;
private final int[] getFDsAsArray (int ops)
{
int[] result;
@@ -237,7 +224,7 @@ public class SelectorImpl extends AbstractSelector
try
{
begin();
result = implSelect (read, write, except, timeout);
result = VMSelector.select (read, write, except, timeout);
}
finally
{