You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/11/24 20:15:32 UTC
svn commit: r883821 - in /commons/sandbox/runtime/trunk/src/main:
java/org/apache/commons/runtime/io/ native/ native/os/darwin/
native/os/hpux/ native/os/linux/ native/os/solaris/ native/os/win32/
Author: mturk
Date: Tue Nov 24 19:15:31 2009
New Revision: 883821
URL: http://svn.apache.org/viewvc?rev=883821&view=rev
Log:
Add AIO support stubs
Added:
commons/sandbox/runtime/trunk/src/main/native/os/darwin/fasync.c (with props)
commons/sandbox/runtime/trunk/src/main/native/os/hpux/fasync.c (with props)
commons/sandbox/runtime/trunk/src/main/native/os/linux/fasync.c (with props)
commons/sandbox/runtime/trunk/src/main/native/os/solaris/fasync.c (with props)
commons/sandbox/runtime/trunk/src/main/native/os/win32/fasync.c (with props)
Modified:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileSystemIo.java
commons/sandbox/runtime/trunk/src/main/native/Makefile.in
commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in
Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileSystemIo.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileSystemIo.java?rev=883821&r1=883820&r2=883821&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileSystemIo.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileSystemIo.java Tue Nov 24 19:15:31 2009
@@ -42,6 +42,12 @@
// Nothing.
}
+ private static native boolean aio0();
+ /**
+ * True if kernel supports asynchronous file I/O.
+ */
+ private static final boolean AIO = aio0();
+
private static native boolean eof0(int fd)
throws IOException;
/**
Modified: commons/sandbox/runtime/trunk/src/main/native/Makefile.in
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/Makefile.in?rev=883821&r1=883820&r2=883821&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/Makefile.in (original)
+++ commons/sandbox/runtime/trunk/src/main/native/Makefile.in Tue Nov 24 19:15:31 2009
@@ -153,6 +153,7 @@
$(SRCDIR)/os/linux/cpu.$(OBJ) \
$(SRCDIR)/os/linux/env.$(OBJ) \
$(SRCDIR)/os/linux/execmem.$(OBJ) \
+ $(SRCDIR)/os/linux/fasync.$(OBJ) \
$(SRCDIR)/os/linux/module.$(OBJ) \
$(SRCDIR)/os/linux/platform.$(OBJ) \
$(SRCDIR)/os/linux/group.$(OBJ) \
@@ -191,6 +192,7 @@
$(SRCDIR)/os/solaris/atomics.$(OBJ) \
$(SRCDIR)/os/solaris/cpu.$(OBJ) \
$(SRCDIR)/os/solaris/env.$(OBJ) \
+ $(SRCDIR)/os/solaris/fasync.$(OBJ) \
$(SRCDIR)/os/solaris/module.$(OBJ) \
$(SRCDIR)/os/solaris/platform.$(OBJ) \
$(SRCDIR)/os/solaris/group.$(OBJ) \
@@ -228,6 +230,7 @@
$(SRCDIR)/os/darwin/arch.$(OBJ) \
$(SRCDIR)/os/darwin/cpu.$(OBJ) \
$(SRCDIR)/os/darwin/env.$(OBJ) \
+ $(SRCDIR)/os/darwin/fasync.$(OBJ) \
$(SRCDIR)/os/darwin/platform.$(OBJ) \
$(SRCDIR)/os/darwin/module.$(OBJ) \
$(SRCDIR)/os/darwin/mutex.$(OBJ) \
@@ -266,6 +269,7 @@
$(SRCDIR)/os/hpux/arch.$(OBJ) \
$(SRCDIR)/os/hpux/cpu.$(OBJ) \
$(SRCDIR)/os/hpux/env.$(OBJ) \
+ $(SRCDIR)/os/hpux/fasync.$(OBJ) \
$(SRCDIR)/os/hpux/group.$(OBJ) \
$(SRCDIR)/os/hpux/module.$(OBJ) \
$(SRCDIR)/os/hpux/platform.$(OBJ) \
Modified: commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in?rev=883821&r1=883820&r2=883821&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in (original)
+++ commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in Tue Nov 24 19:15:31 2009
@@ -118,6 +118,7 @@
$(SRCDIR)/os/win32/dso.$(OBJ) \
$(SRCDIR)/os/win32/env.$(OBJ) \
$(SRCDIR)/os/win32/execmem.$(OBJ) \
+ $(SRCDIR)/os/win32/fasync.$(OBJ) \
$(SRCDIR)/os/win32/file.$(OBJ) \
$(SRCDIR)/os/win32/finfo.$(OBJ) \
$(SRCDIR)/os/win32/fsysio.$(OBJ) \
Added: commons/sandbox/runtime/trunk/src/main/native/os/darwin/fasync.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/darwin/fasync.c?rev=883821&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/darwin/fasync.c (added)
+++ commons/sandbox/runtime/trunk/src/main/native/os/darwin/fasync.c Tue Nov 24 19:15:31 2009
@@ -0,0 +1,35 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "acr.h"
+#include "acr_private.h"
+#include "acr_arch.h"
+#include "acr_port.h"
+#include "acr_error.h"
+#include "acr_string.h"
+#include "acr_memory.h"
+#include "acr_descriptor.h"
+#include "acr_pointer.h"
+#include "acr_file.h"
+#include "acr_fileio.h"
+
+/* AIO support
+ */
+
+ACR_IO_EXPORT_DECLARE(jboolean, FileSystemIo, aio0)(ACR_JNISTDARGS)
+{
+ return JNI_FALSE;
+}
Propchange: commons/sandbox/runtime/trunk/src/main/native/os/darwin/fasync.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/sandbox/runtime/trunk/src/main/native/os/hpux/fasync.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/hpux/fasync.c?rev=883821&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/hpux/fasync.c (added)
+++ commons/sandbox/runtime/trunk/src/main/native/os/hpux/fasync.c Tue Nov 24 19:15:31 2009
@@ -0,0 +1,35 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "acr.h"
+#include "acr_private.h"
+#include "acr_arch.h"
+#include "acr_port.h"
+#include "acr_error.h"
+#include "acr_string.h"
+#include "acr_memory.h"
+#include "acr_descriptor.h"
+#include "acr_pointer.h"
+#include "acr_file.h"
+#include "acr_fileio.h"
+
+/* AIO support
+ */
+
+ACR_IO_EXPORT_DECLARE(jboolean, FileSystemIo, aio0)(ACR_JNISTDARGS)
+{
+ return JNI_FALSE;
+}
Propchange: commons/sandbox/runtime/trunk/src/main/native/os/hpux/fasync.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/sandbox/runtime/trunk/src/main/native/os/linux/fasync.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/linux/fasync.c?rev=883821&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/linux/fasync.c (added)
+++ commons/sandbox/runtime/trunk/src/main/native/os/linux/fasync.c Tue Nov 24 19:15:31 2009
@@ -0,0 +1,47 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "acr.h"
+#include "acr_private.h"
+#include "acr_arch.h"
+#include "acr_port.h"
+#include "acr_error.h"
+#include "acr_string.h"
+#include "acr_memory.h"
+#include "acr_descriptor.h"
+#include "acr_pointer.h"
+#include "acr_file.h"
+#include "acr_fileio.h"
+
+/* AIO support
+ */
+#if HAVE_LIBAIO_H
+#include <sys/time.h>
+#include <libaio.h>
+
+ACR_IO_EXPORT_DECLARE(jboolean, FileSystemIo, aio0)(ACR_JNISTDARGS)
+{
+ return JNI_TRUE;
+}
+
+#else
+
+ACR_IO_EXPORT_DECLARE(jboolean, FileSystemIo, aio0)(ACR_JNISTDARGS)
+{
+ return JNI_FALSE;
+}
+
+#endif /* HAVE_LIBAIO_H */
Propchange: commons/sandbox/runtime/trunk/src/main/native/os/linux/fasync.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/sandbox/runtime/trunk/src/main/native/os/solaris/fasync.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/solaris/fasync.c?rev=883821&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/solaris/fasync.c (added)
+++ commons/sandbox/runtime/trunk/src/main/native/os/solaris/fasync.c Tue Nov 24 19:15:31 2009
@@ -0,0 +1,35 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "acr.h"
+#include "acr_private.h"
+#include "acr_arch.h"
+#include "acr_port.h"
+#include "acr_error.h"
+#include "acr_string.h"
+#include "acr_memory.h"
+#include "acr_descriptor.h"
+#include "acr_pointer.h"
+#include "acr_file.h"
+#include "acr_fileio.h"
+
+/* AIO support
+ */
+
+ACR_IO_EXPORT_DECLARE(jboolean, FileSystemIo, aio0)(ACR_JNISTDARGS)
+{
+ return JNI_FALSE;
+}
Propchange: commons/sandbox/runtime/trunk/src/main/native/os/solaris/fasync.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/sandbox/runtime/trunk/src/main/native/os/win32/fasync.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/fasync.c?rev=883821&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/fasync.c (added)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/fasync.c Tue Nov 24 19:15:31 2009
@@ -0,0 +1,35 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "acr.h"
+#include "acr_private.h"
+#include "acr_arch.h"
+#include "acr_port.h"
+#include "acr_error.h"
+#include "acr_string.h"
+#include "acr_memory.h"
+#include "acr_descriptor.h"
+#include "acr_pointer.h"
+#include "acr_file.h"
+#include "acr_fileio.h"
+
+/* AIO support
+ */
+
+ACR_IO_EXPORT_DECLARE(jboolean, FileSystemIo, aio0)(ACR_JNISTDARGS)
+{
+ return JNI_TRUE;
+}
Propchange: commons/sandbox/runtime/trunk/src/main/native/os/win32/fasync.c
------------------------------------------------------------------------------
svn:eol-style = native